RabbitMQ prometheus plugin installation

1,986 views
Skip to first unread message

Raul Kaubi

unread,
Aug 15, 2018, 7:00:21 AM8/15/18
to rabbitmq-users
Hi

I don't know if this is the right place to ask the question about prometheus_rabbitmq_exporter plugins, but.since it's rabbitmq plugins, I'll give it a try here.

Centos 7.5
RabbitMQ 3.7.7 (using new configuration format, i.e. rabbitmq.conf and advanced.config)
Erlang 21.0.3 (zero dependency erlang rpm)

Just noting, what I have done so far:

I have downloaded all 6 .ez files from here
https://github.com/deadtrickster/prometheus_rabbitmq_exporter/releases/tag/v3.7.2.2

I put these all into this directory:
/usr/lib/rabbitmq/lib/rabbitmq_server-3.7.7/plugins/

Next, I enabled all 6 of these plugins, as mentioned here, "Installation" section:
https://github.com/deadtrickster/prometheus_rabbitmq_exporter

Restarted rabbitmq-server:
systemctl restart rabbitmq-server


After service restart, rabbitmq-plugins list only one of these previously enabled plugins, but perhaps this is supposed to be like that:
 rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status: * = running on rabbit@pretestrabbit2
 |/
[E*] prometheus_rabbitmq_exporter      v3.7.2.2
...............

However, enabled_plugins file shows all of these except one, i.e. prometheus_httpd
[root@XXXXXXXXXXXX ~]# cat /etc/rabbitmq/enabled_plugins
[accept,prometheus,prometheus_cowboy,prometheus_process_collector,prometheus_rabbitmq_exporter,rabbitmq_auth_backend_ldap,rabbitmq_delayed_message_exchange,rabbitmq_management,rabbitmq_shovel,rabbitmq_shovel_management,rabbitmq_top].


My question is how I am supposed to access these previously enabled plugin (or start it up or sth)..?
(since now I have understood that enabled plugins appear in management-UI "Admin" tab, but there seems to be appearing no such thing)


Second question is about configuration. Here this sample is for old configuration format (/etc/rabbit/rabbitmq.config), I am using new configuration format.
Should I add these values to advanced.config, if so, then where do I put it exactly, since here is a warning to declare prometheus before rabbitmq_management, and management part is in rabbitmq.conf file instead.
%% Be careful to declare the "prometheus" app
%% environment before the "rabbitmq_management" one.


Regards
Raul

Michael Klishin

unread,
Aug 15, 2018, 11:08:28 AM8/15/18
to rabbitm...@googlegroups.com
As of 3.7.x only libraries that depend on RabbitMQ core will show up in `rabbitmq-plugins list`.
There is no need to enable all others manually: a plugin with correctly stated dependencies that are
available on code path will be enabled automatically. They are dependencies of the actual plugin,
why would you need to "access" them?

I don't see how the order of sections in the config might matter. All config "sections" are loaded at the same time.
If Prometheus exporter depends on something in the management plugin and needs it to be running it should declare such a dependency
in its .app file.

The question about advanced.config is hopefully answered by the docs [1] and [2].



--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Michael Klishin

unread,
Aug 15, 2018, 11:15:35 AM8/15/18
to rabbitm...@googlegroups.com
I filed a couple of issues for that plugin. Its README seems to be misleading and out of date.

To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Raul Kaubi

unread,
Aug 15, 2018, 1:41:19 PM8/15/18
to rabbitm...@googlegroups.com
Thanks for that.
About accessing, what I meant , how can I get into this plugin view..?

image1.jpeg


Regards
Raul

Sent from my iPhone
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/Fi7NE_k6Nlk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.

Michael Klishin

unread,
Aug 15, 2018, 1:46:06 PM8/15/18
to rabbitm...@googlegroups.com
The plugin simply stores metrics in Prometheus. It does not provide a UI for it.

Use Grafana [1] or similar for that.


image1.jpeg


Regards
To unsubscribe from this group and all its topics, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

junyi...@gmail.com

unread,
Sep 4, 2018, 12:16:23 AM9/4/18
to rabbitmq-users
Hello Michael,

Can you pls let me konw how the plugin knows where the prometheus server is? I've the plugins enabled but not sure how Prometheus scrape the metrics. Below is my config in prometheus.yml

 - job_name: 'rabbitmq_exporter'
    metrics_path: /mymetrics
    static_configs:
    - targets: ['192.168.1.12:15672']

Rgds,
Junyi
image1.jpeg


Regards
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.

To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

--
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/Fi7NE_k6Nlk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.

To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.

To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Martin Schröder

unread,
Sep 4, 2018, 1:46:27 AM9/4/18
to rabbitm...@googlegroups.com
Am Di., 4. Sep. 2018 um 06:16 Uhr schrieb <junyi...@gmail.com>:
> Can you pls let me konw how the plugin knows where the prometheus server is? I've the plugins enabled but not sure how Prometheus scrape the metrics. Below is my config in prometheus.yml
>
> - job_name: 'rabbitmq_exporter'
> metrics_path: /mymetrics

<quote>
path - scrape endpoint. Default is "metrics". Note RabbitMQ translates
this to "/api/metrics";
</quote>

Best
Martin

PS: Learn to quote, please.

Junyi

unread,
Sep 4, 2018, 4:20:22 AM9/4/18
to rabbitm...@googlegroups.com
thanks for your quick response, Martin. I'm new to google group so let me try how quote works.  Below is my rabbitmq.config in which I specifiied the path as /mymetrics.

<quote> 
$ sudo cat /etc/rabbitmq/rabbitmq.config
[
 {rabbit, [
   {loopback_users, []},
   {tcp_listeners, [5672]},
   {ssl_listeners, []}
 ]},
 %% Be careful to declare the "prometheus" app
 %% environment before the "rabbitmq_management" one.
 {prometheus, [
   {rabbitmq_exporter, [
     {path, "/mymetrics"},
     {connections_total_enabled, true}
   ]}
 ]},
 {rabbitmq_management, [
   {listener, [
     {port, 15672},
     {ssl, false}
   ]}
 ]}
].

</quote> 

Rgds,
Junyi

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send an email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

Regards,
Junyi

Michael Klishin

unread,
Sep 4, 2018, 7:33:27 AM9/4/18
to rabbitm...@googlegroups.com
This list uses one thread per question. Please start a new thread.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Sep 4, 2018, 7:33:50 AM9/4/18
to rabbitm...@googlegroups.com
Please start a new thread and explain what you are trying to achieve.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send an email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

Regards,
Junyi

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages