JMX Exporter - How to handle mBeans with string values

779 views
Skip to first unread message

prz...@zelazko.org

unread,
Dec 4, 2018, 11:44:11 AM12/4/18
to Prometheus Users
Hi,

I'm trying to configure JMX exporter for kafka-connect and I ran into a problem. Some of the metrics I am interested in, e.g. connector and task status, are exported as string values. Unfortunately such beans seem to be ignored:

FINE: scrape: 'kafka.connect{type=connector-task-metrics, connector=_GL_GAWRON_BUSINESSPROCESSSTARTERADAPTER_TEST-STATUS_, task=0}status': paused
FINE: Ignoring unsupported bean: kafka.connect<type=connector-task-metrics, connector=_GL_GAWRON_BUSINESSPROCESSSTARTERADAPTER_TEST-STATUS_, task=0><>status: paused

Is there a way to handle such values (map to int?)?

Regards,
Przemek

Brian Brazil

unread,
Dec 4, 2018, 12:39:53 PM12/4/18
to prz...@zelazko.org, Prometheus Users
 

Regards,
Przemek

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/91d04a50-4fdd-4940-9f67-4c96a49d096c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

prz...@zelazko.org

unread,
Dec 4, 2018, 1:38:16 PM12/4/18
to Prometheus Users

W dniu wtorek, 4 grudnia 2018 18:39:53 UTC+1 użytkownik Brian Brazil napisał:
 

I actually tried something very similar, but no dice:

- pattern: 'kafka.connect<type=connector-task-metrics, connector=(.+), task=(.+)><>status: (.+)'
name: kafka_connect_task_status
value: 1
labels:
connector: "$1"
task: "$2"
status: "$3" 

It seems like tabular values (that seems to be what is processed in the post you linked to) are handled differently than plain atomic strings. I am still getting the "Ignoring unsupported bean" message. 

Brian Brazil

unread,
Dec 4, 2018, 1:54:49 PM12/4/18
to prz...@zelazko.org, Prometheus Users
I'd expect that to work. Do you have attrNameSnakeCase set?

--

prz...@zelazko.org

unread,
Dec 4, 2018, 2:02:12 PM12/4/18
to Prometheus Users


W dniu wtorek, 4 grudnia 2018 19:54:49 UTC+1 użytkownik Brian Brazil napisał:


I'd expect that to work. Do you have attrNameSnakeCase set?


 No, I don't have attrNameSnakeCase set. I didn't think it would make any difference, but I can try tomorrow when I'm back at the office.
Reply all
Reply to author
Forward
0 new messages