Skip to content

Commit 8e7038f

Browse files
committedDec 3, 2020
Add monitoring example
1 parent 8f066d1 commit 8e7038f

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
 

Diff for: ‎docs/examples/prometheus/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Prometheus Example
2+
3+
See [Monitoring RabbitMQ in Kubernetes](https://www.rabbitmq.com/kubernetes/operator/operator-monitoring.html) for detailed instructions.
4+
5+
If you deployed the [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator), make Prometheus scrape RabbitMQ nodes by:
6+
```shell
7+
kubectl apply -f rabbitmq-podmonitor.yaml
8+
```
9+
10+
Alternatively, if you deployed the Prometheus Operator via the [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) Helm chart,
11+
set the values in [kube-prometheus-stack-values.yaml](kube-prometheus-stack-values.yaml) when installing / upgrading the Helm chart.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
prometheus:
3+
additionalPodMonitors:
4+
- name: rabbitmq
5+
podMetricsEndpoints:
6+
- port: prometheus
7+
selector:
8+
matchLabels:
9+
app.kubernetes.io/component: rabbitmq
10+
namespaceSelector:
11+
any: true

Diff for: ‎docs/examples/prometheus/rabbitmq-podmonitor.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: PodMonitor
4+
metadata:
5+
name: rabbitmq
6+
spec:
7+
podMetricsEndpoints:
8+
- interval: 15s
9+
port: prometheus
10+
selector:
11+
matchLabels:
12+
app.kubernetes.io/component: rabbitmq
13+
namespaceSelector:
14+
any: true

0 commit comments

Comments
 (0)
Please sign in to comment.