Skip to content

Commit 019bc24

Browse files
authored
Merge pull request #1037 from rabbitmq/service-monitor-tls
Document how to set up tls verify for prometheus servicemonitor
2 parents 39a33a2 + 67b74cd commit 019bc24

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

observability/prometheus/monitors/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ metadata:
2525
2626
Given the `matchLabels` fields from the Prometheus spec above, you would need to add the label `release: my-prometheus` to the `PodMonitor` and `ServiceMonitor` objects.
2727

28-
File [rabbitmq-servicemonitor.yml](./rabbitmq-servicemonitor.yml) contains scrape targets for RabbitMQ.
28+
File [rabbitmq-servicemonitor.yml](./rabbitmq-servicemonitor.yml) contains scrape targets for RabbitMQ. TLS verify will be skipped by default. To enable TLS verification for scraping, set `spec.endpoints[port=prometheus-tls].tlsConfig.insecureSkipVerify` to false and provide a Kubernetes Secret containing CA cert used for Prometheus.
2929
Metrics listed in [RabbitMQ metrics](https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/rabbitmq_prometheus/metrics.md) will be scraped from all RabbitMQ nodes.
3030
Note that the ServiceMonitor object works only for RabbitMQ clusters deployed by [cluster-operator](https://github.com/rabbitmq/cluster-operator) `>v1.6.0`. If you run cluster-operator `<=v1.6.0` use a PodMonitor instead:
3131

observability/prometheus/monitors/rabbitmq-servicemonitor.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ spec:
1515
interval: 15s
1616
scrapeTimeout: 14s
1717
tlsConfig:
18-
insecureSkipVerify: true
18+
insecureSkipVerify: true # set to false and uncomment lines below to enable tls verification
19+
# ca:
20+
# secret:
21+
# key: ca.crt
22+
# name: tls-secret # name of the secret containing the CA cert which signed the RabbitMQ Prometheus TLS cert
23+
# serverName: '*.RABBITMQ-INSTANCE-NAME.NAMESPACE.svc.cluster.local'
1924
- port: prometheus
2025
scheme: http
2126
path: /metrics/detailed

0 commit comments

Comments
 (0)