Metricbeat failed to unmarshal jolokia JSON response

Hello team!

I am trying to use the Jolokia module of Metricbeat to collect jmx metrics and get this error:

failed to unmarshal jolokia JSON response '{"request":{"type":"version"},"value":{"agent":"1.6.0","protocol":"7.2","config":{"listenForHttpService":"true","authIgnoreCerts":"false","agentId":"","debug":"false","agentType":"servlet","policyLocation":"classpath:\/jolokia-access.xml","agentContext":"\/jolokia","serializeException":"false","mimeType":"text\/plain","dispatcherClasses":"org.jolokia.http.Jsr160ProxyNotEnabledByDefaultAnymoreDispatcher","authMode":"basic","streaming":"true","canonicalNaming":"true","historyMaxEntries":"10","allowErrorDetails":"true","allowDnsReverseLookup":"true","realm":"jolokia","includeStackTrace":"true","useRestrictorService":"false","debugMaxEntries":"100"},"info":{"product":"tomcat","vendor":"Apache","version":"8.5.6"}},"timestamp":1550758168,"status":200}': json: cannot unmarshal object into Go value of type []jmx.Entry

I use this metricbeat conf:

###################### Metricbeat Configuration Example #######################@
#==========================  Modules jolokia configuration ============================
metricbeat.modules:
- module: jolokia
  metricsets: ["jmx"]
  enabled: true
  period: 10s
  namespace: "metrics"
  hosts: ["localhost"]
  http_method: "POST"
  path: "/plugins/servlet/jolokia/"
  #username: ""
  #password: ""
  jmx.mappings:
    - mbean: 'Catalina:type=Manager,host=localhost,context=/'
      attributes:
        - attr: activeSessions
          field: activeSessions  
    - mbean: 'Catalina:type=ThreadPool,name="http-nio8090"'
      attributes:
        - attr: connectionCount
          field: connectionCount 
    - mbean: 'java.lang:type=Memory'
      attributes:
        - attr: HeapMemoryUsage.max
          field: heapMemoryUsageMax 
    - mbean: 'java.lang:type=Memory'
      attributes:
        - attr: HeapMemoryUsage.used
          field: heapMemoryUsed 
setup.template.settings:
  index:
    number_of_shards: 1,
    number_of_replicas: 0,
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  hosts: ["elastic:9200"]
  #username: "elastic"
  #password: "vaudoise"

We are using metricbeat-6.2.4 and also a 6.2.4 elasticsearch.
Thx for your help !!!

Hello! I think this is probably a bug in the code hmm Can you file an issue with more details in github repo please https://github.com/elastic/beats/issues ? Thank you!!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.