prometheus/documentation/examples/contrib/kubernetes/rabbitmq
Tiago Katcipis b7ae20d3d8 fixing typos 2016-01-17 21:35:51 -02:00
..
README.md fixing typos 2016-01-17 21:35:51 -02:00
rc.yml Adding RabbitMQ example as mentioned on #1312 2016-01-12 20:59:37 -02:00
svc.yml Adding RabbitMQ example as mentioned on #1312 2016-01-12 20:59:37 -02:00

README.md

RabbitMQ Scraping

This is an example on how to setup RabbitMQ so Prometheus can scrap data from it. It uses a third party RabbitMQ exporter.

Since the RabbitMQ exporter needs to connect on RabbitMQ management API to scrap data, and it defaults to localhost, it is easier to simply embed the kbudde/rabbitmq-exporter on the same pod as RabbitMQ, this way they share the same network.

With this pod running you will have the exporter scraping data, but Prometheus have not yet found the exporter and is not scraping data from it.

For more details on how to use kubernetes service discovery take a look on the documentation and on the available examples.

After you got Kubernetes service discovery up and running you just need to advertise that RabbitMQ is exposing metrics. To do that you need to define a service that:

  • Exposes the exporter port
  • Add the annotation: prometheus.io/scrape: "true"
  • Add the annotation: prometheus.io/port: "9090"

And you should be able to see your RabbitMQ exporter being scraped on Prometheus status page. Since the ip that will be scraped will be the pod endpoint it is important that the node where Prometheus is running have access to the Kubernetes overlay network (flannel, weave, aws, or any of the other options that Kubernetes gives to you).