mirror of https://github.com/prometheus/prometheus
Tiago Katcipis
9 years ago
3 changed files with 11 additions and 11 deletions
@ -1,28 +1,28 @@ |
|||||||
# RabbitMQ Scraping |
# RabbitMQ Scraping |
||||||
|
|
||||||
This is an example on how to setup RabbitMQ so Prometheus can scrap data from it. |
This is an example on how to setup RabbitMQ so Prometheus can scrape data from it. |
||||||
It uses a third party [RabbitMQ exporter](https://github.com/kbudde/rabbitmq_exporter). |
It uses a third party [RabbitMQ exporter](https://github.com/kbudde/rabbitmq_exporter). |
||||||
|
|
||||||
Since the [RabbitMQ exporter](https://github.com/kbudde/rabbitmq_exporter) needs to |
Since the [RabbitMQ exporter](https://github.com/kbudde/rabbitmq_exporter) needs to |
||||||
connect on RabbitMQ management API to scrap data, and it defaults to localhost, it is |
scrape the 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, |
easier to simply embed the **kbudde/rabbitmq-exporter** on the same pod as RabbitMQ, |
||||||
this way they share the same network. |
this way they share the same network. |
||||||
|
|
||||||
With this pod running you will have the exporter scraping data, but Prometheus have not |
With this pod running you will have the exporter scraping data, but Prometheus has not |
||||||
yet found the exporter and is not scraping data from it. |
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 |
For more details on how to use Kubernetes service discovery take a look at the |
||||||
[documentation](http://prometheus.io/docs/operating/configuration/#kubernetes-sd-configurations-kubernetes_sd_config) |
[documentation](http://prometheus.io/docs/operating/configuration/#kubernetes-sd-configurations-kubernetes_sd_config) |
||||||
and on the [available examples](./documentation/examples). |
and at the [available examples](./documentation/examples). |
||||||
|
|
||||||
After you got Kubernetes service discovery up and running you just need to advertise that RabbitMQ |
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: |
is exposing metrics. To do that you need to define a service that: |
||||||
|
|
||||||
* Exposes the exporter port |
* Exposes the exporter port |
||||||
* Add the annotation: prometheus.io/scrape: "true" |
* Has a **prometheus.io/scrape: "true"** annotation |
||||||
* Add the annotation: prometheus.io/port: "9090" |
* Has a **prometheus.io/port: "9090"** annotation |
||||||
|
|
||||||
And you should be able to see your RabbitMQ exporter being scraped on Prometheus status page. |
And you should be able to see your RabbitMQ exporter being scraped on the Prometheus status page. |
||||||
Since the ip that will be scraped will be the pod endpoint it is important that the node |
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 |
where Prometheus is running has access to the Kubernetes overlay network |
||||||
(flannel, weave, aws, or any of the other options that Kubernetes gives to you). |
(flannel, Weave, AWS, or any of the other options that Kubernetes gives to you). |
Loading…
Reference in new issue