Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 0 additions & 4 deletions config/default/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ resources:
# [CERTMANAGER] Uncomment next line to enable cert-manager
#- ../certmanager

# This patch stop manager from emitting any metrics
# For more context, refer to story #167092237
patchesStrategicMerge:
- manager_disable_metrics_patch.yaml
images:
- name: rabbitmqoperator/cluster-operator-dev
newName: rabbitmqoperator/cluster-operator
Expand Down
32 changes: 0 additions & 32 deletions config/default/base/manager_auth_proxy_patch.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions config/default/base/manager_disable_metrics_patch.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions config/default/base/manager_prometheus_metrics_patch.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
ports:
- containerPort: 9782
name: metrics
protocol: TCP
terminationGracePeriodSeconds: 10
5 changes: 5 additions & 0 deletions docs/examples/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ If you deployed the [Prometheus Operator](https://github.com/prometheus-operator
kubectl apply -f rabbitmq-podmonitor.yaml
```

Make Prometheus scrape the RabbitMQ Cluster Operator by:
```shell
kubectl apply -f rabbitmq-cluster-operator-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.example](kube-prometheus-stack-values.yaml.example) when installing / upgrading the Helm chart.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ prometheus:
app.kubernetes.io/component: rabbitmq
namespaceSelector:
any: true
- name: rabbitmq-cluster-operator
podMetricsEndpoints:
- port: metrics
selector:
matchLabels:
app.kubernetes.io/component: rabbitmq-cluster-operator
namespaceSelector:
matchNames: [rabbitmq-system]
14 changes: 14 additions & 0 deletions docs/examples/prometheus/rabbitmq-cluster-operator-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-cluster-operator
spec:
podMetricsEndpoints:
- port: metrics
selector:
matchLabels:
app.kubernetes.io/component: rabbitmq-cluster-operator
namespaceSelector:
matchNames:
- rabbitmq-system