JMX exporter and SimpleClient

34 views
Skip to first unread message

paolo achdjian

unread,
Jul 2, 2020, 9:27:52 AM7/2/20
to Prometheus Users
Hi all, 

I registered  a few metrics using the SimpleClient classes (e.g. Histogram, Gauge and so on) and I would export them using the jmx_exporter so I created a bean exposing my metrics. Then I run my application (a springboot application) but I only see the "standard" metrics (java memory, cpu usage and so on).
Following the suggestion on the readme of the jmx_exported project, I run a stand-alone scrapper and I saw that my metrics was not exported because the SimpleClient classes doesn't implement Serializable interface and so my bean can't be exported.
"Fail: java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: io.prometheus.client.Histogram"

I miss something or really I can't use these classes with the jmx_exporter agent

Regards,
Paolo
Reply all
Reply to author
Forward
0 new messages