Unexpected data in telegraf agent with Jolokia2_agent plugin

Hi Team,

I have used [[inputs.jolokia2_agent]] plugin to collect JVM generic metrics where jolokia agent deployed to do the work. Getting the value "-1 " for processcpuload which is not possible in any case. Can anyone tel me the scenario where the -1 value for processcpuload ?


That’s weird, if this is happening frequently you could try looking at the response data from Jolokia, the query should look something like this:

curl -X POST 'http://jolokia:jolokia1!@localhost:8080/jolokia-my-sos/read' -H 'Content-Type:application/json' -d '[{"type":"read","mbean":"java.lang:type=OperatingSystem","attribute":["ProcessCpuLoad"]}]'

The lack of escaping of the password above might be a problem, it might be possible to send the user/pass as basic auth to curl: -u jolokia:jolokia1!, but I’m not sure. I can say that the plugin uses the URL.