jmxtrans / jmxtrans-agent

Java Agent based JMX metrics exporter.
MIT License
178 stars 110 forks source link

Adding filter name="http-bio-8080" instead of "*" to the query in JMXtransagent.xml to obtain metrics from Globalrequestprocessor mbean doesn't give any data #101

Open SubhaSrini opened 7 years ago

SubhaSrini commented 7 years ago

I want to get the processingTime metrics for only HTTP connector from the Globalrequestprocessor mbean. Hence I had given the query in jmxtransagent.xml like

query objectName="Catalina:type=GlobalRequestProcessor,name=http-nio-8080" attribute="processingTime" resultAlias="tomcat.processingTime"

instead of

query objectName="Catalina:type=GlobalRequestProcessor,name=*" attribute="processingTime" resultAlias="tomcat.processingTime"

I am not getting any data related to processingTime in the outputwriter(influxdb, console or fileoutputwriter).

Can anyone let me know what wrong am I doing ?

liuyangc3 commented 7 years ago

on my PC, objectName is Catalina:type=GlobalRequestProcessor,name="http-nio-8080" and you should use " instadd of '"' in xml here is an example

<query objectName="Catalina:type=GlobalRequestProcessor,name=&quot;http-nio-8080&quot;" 
attribute="processingTime" resultAlias="tomcat.processingTime" />
simmel commented 6 years ago

Did that solve your problem @SubhaSrini ? Can this be closed?