Hi there,
I'm trying to parse jmx mbean properties using jolokia module with metricbeat but have problems when having multiple datasource mbean entries (no problem when having one unique entry).
metricbeat 5.4.3
logstash:5.4.2
elasticsearch:5.4.2
jolokia-jvm-1.3.6-agent.jar
I tried different synthaxes (double quoted, escaping chars or not, etc.) but either got No key error or Unmarshall error or _grokparsefailure tag in output and not any new fields in my index.
Nothing in the metricbeat logs though :
fetches.jolokia-jmx.events=30 fetches.jolokia-jmx.success=30
Thanks in advance for any help!
- jolokia agent json list extract :
{ "timestamp": 1498825349, "status": 200, "request": { "type": "list" }, "value": { ... "Catalina": { ... "class=javax.sql.DataSource,context=/akuiteo,host=localhost,name=\"jdbc/V9GestionDS\",type=DataSource": { "desc": null, "class": "org.apache.tomcat.util.modeler.BaseModelMBean", "attr": { "maxIdle": { "desc": "Introspected attribute maxIdle", "type": "int", "rw": true }, "maxActive": { "desc": "Introspected attribute maxActive", "type": "int", "rw": true } } ... }, "class=javax.sql.DataSource,context=/akuiteo.collabs,host=localhost,name=\"jdbc/V9GestionDS\",type=DataSource": { ... } } } }
- metricbeat.yml extract :
- module: jolokia metricsets: ["jmx"] enabled: true period: 1s hosts: ["localhost:8778"] namespace: "metrics" jmx.mappings: - mbean: 'java.lang:type=Runtime' attributes: - attr: Uptime field: uptime - mbean: 'Catalina:type=Server' attributes: - attr: serverInfo field: tomcat_server_info - mbean: 'Catalina:class=javax.sql.DataSource,context=\/akuiteo,host=localhost,name=jdbc\/V9GestionDS,type=DataSource' attributes: - attr: maxActive field: datasource_max_active - attr: numActive field: datasource_max_active - attr: numIdle field: datasource_num_idle