0

I have been trying to monitor a custom JMX metrics using stackdriver, . I saw the below GIT page for fetching MBEAN metrics,

https://github.com/Stackdriver/stackdriver-agent-service-configs/blob/master/etc/collectd.d/jvm-sun-hotspot.conf

I require some additional custom metrics thats needs to be monitored from Stackdriver. Basically, i need openejb.management:ObjectType=datasources,DataSource=jdbc_db

I tried modifying the conf file from Github by removing the OOb Mbeans and added the custom MBEAN, and i changed the target set to

<Target "set"> MetaData "stackdriver_metric_type" "custom.googleapis.com/jvm/jmx/datasource/jdbc_db"

I see a new metric is getting propagated to Stack driver, but other OOb metrics are affected, Can anyone provide a conf file which i can deplot in /stackdriver/collectd/etc/collectd.d/ location which will sends the custom MBean to Stachdriver

  • have you installed the jvm agent metric? https://cloud.google.com/monitoring/api/metrics_agent#agent-jvm also the jvm pluggin for this https://cloud.google.com/monitoring/agent/plugins/jvm so that you can have the logs monitored and metrics propagated to Stackdriver. I also found a similar issue: https://stackoverflow.com/questions/62414258/adding-custom-jmx-metrics-to-google-cloud-monitoring-collectd-configuration I would recommend reading through the documentation and this stack question that could provide you with answers – LukeTerro Nov 19 '20 at 21:55
  • I have installed the agent, and jvm plugin. The stacokoverflow page you pointed to doesnt explains whether a new conf file has been creatd or the jvm-sun-hotspot file has been modified. – Jagadheeswaran Mohan Nov 20 '20 at 11:07
  • I recommend you follow this guide [1] You will need to configure your own metric. [1]https://cloud.google.com/monitoring/agent/custom-metrics-agent – LukeTerro Nov 23 '20 at 21:05

0 Answers0