munin-monitoring / contrib

Contributed stuff for munin (plugins, tools, etc...)
http://munin-monitoring.org
1.05k stars 682 forks source link

[rabbitmq_consumers] Fix rabbitmqctl output filter #1323

Closed codeurimpulsif closed 1 year ago

codeurimpulsif commented 2 years ago

Goal

Informations

By default rabbitmqctl list_queues -p / name consumers give this kind of output:

Timeout: 60.0 seconds ...
Listing queues for vhost / ...
name    consumers
celery  1

Then in this plugin it result to:

Timeout:.value 60.0
name.value consumers
celery.value 1

The consumers value generates the following error message:

[ERROR] In RRD: Error updating /var/lib/munin/production/server1-rabbitmq_consumers-name-g.rrd: /var/lib/munin/production/server1-rabbitmq_consumers-name-g.rrd: Function update_pdp_prep, case DST_GAUGE - Cannot convert 'consumers' to float

This merge request fix the grep command to get this plugin result:

celery.value 1
codeurimpulsif commented 1 year ago

Is this PR ok? Did I need to add other things?