Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Prometheus example #513

Merged
merged 4 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/examples/prometheus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Prometheus Example

See [Monitoring RabbitMQ in Kubernetes](https://www.rabbitmq.com/kubernetes/operator/operator-monitoring.html) for detailed instructions.

If you deployed the [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator), make Prometheus scrape RabbitMQ nodes by:
```shell
kubectl apply -f rabbitmq-podmonitor.yaml
```

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,
set the values in [kube-prometheus-stack-values.yaml](kube-prometheus-stack-values.yaml) when installing / upgrading the Helm chart.
11 changes: 11 additions & 0 deletions docs/examples/prometheus/kube-prometheus-stack-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
prometheus:
additionalPodMonitors:
- name: rabbitmq
podMetricsEndpoints:
- port: prometheus
selector:
matchLabels:
app.kubernetes.io/component: rabbitmq
namespaceSelector:
any: true
14 changes: 14 additions & 0 deletions docs/examples/prometheus/rabbitmq-podmonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: rabbitmq
spec:
podMetricsEndpoints:
- interval: 15s
port: prometheus
selector:
matchLabels:
app.kubernetes.io/component: rabbitmq
namespaceSelector:
any: true