Metricbeat activemq & jolokia modules error (using HTTP when HTTPS specified)

Hi,

I have turned on these two modules in activemq server (version 5.15.9). jolokia is enabled by default on HTTPS port.
i am seeing that, even after clearly specifying on activemq.yml and jolokia.yml the value of host with HTTPS://serverip:8162 , the beat is trying to POST using HTTP protocol.

Error fetching data for metricset activemq.topic: error making http request: Post http://xxxx.com:8162/api/jolokia/%3FignoreErrors=true&canonicalNaming=false: EOF

2020-06-05T13:25:27.453-0400 INFO module/wrapper.go:252 Error fetching data for metricset activemq.broker: error making http request: Post http://xxxxx.com:8162/api/jolokia/%3FignoreErrors=true&canonicalNaming=false: EOF
2020-06-05T13:25:27.453-0400 INFO module/wrapper.go:252 Error fetching data for metricset activemq.queue: error making http request: Post http://xxx.com:8162/api/jolokia/%3FignoreErrors=true&canonicalNaming=false: EOF


activemq.yml
Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.6/metricbeat-module-activemq.html

  • module: activemq
    metricsets: ['broker', 'queue', 'topic']
    period: 10s
    hosts: ['https://xxx.com:8162']
    path: '/api/jolokia/?ignoreErrors=true&canonicalNaming=false'
    .2020-06-05T14:36:41.202-0400 INFO module/wrapper.go:252 Error fetching data for metricset jolokia.jmx: HTTP error 404 in : 404 Not Found
    .
    .
    -.

please help.

Hi @Don-cloud,

Welcome to the Elastic community forums!

I just tried this with building Metricbeat from the master branch and I'm unable to reproduce this. I see https being used in the URL. Could you tell us your Metricbeat version please?

Thanks,

Shaunak

metricbeat version 7.6.2
i have updated the error log, up in original post to put more details
2020-06-05T14:36:41.202-0400 INFO module/wrapper.go:252 Error fetching data for metricset jolokia.jmx: HTTP error 404 in : 404 Not Found

Thanks. I was indeed able to reproduce this locally with Metricbeat 7.6.2. However, I also tried with the next release — Metricbeat 7.7.0 — and this problem seems to have been fixed in it. So you might want to give that a try.

Shaunak

will metricbeat 7.7.0 can communicate to elastic version 7.6.2?

We strongly recommend you run the entire Elastic Stack on the same version but I can't think of a reason why Metricbeat 7.7.0 wouldn't work against Elasticsearch 7.6.2.

Shaunak

i upated metricbeat to 7.7.1.
i am not getting the error on activemq.
I am still getting the error on jolokia though.
2020-06-06T12:56:30.682-0400 INFO module/wrapper.go:259 Error fetching data for metricset jolokia.jmx: HTTP error 404 in : 404 Not Found

---------- jolokia.yml

Module: jolokia

docs

path: "api/jolokia"

username: "xxxx"
password: "xxxx"
jmx.mappings:
- mbean: 'java.lang:type=Runtime'
attributes:
- attr: Uptime
field: uptime
#- mbean: 'java.lang:type=Memory'
# attributes:
# - attr: HeapMemoryUsage
# field: memory.heap_usage
# - attr: NonHeapMemoryUsage
# field: memory.non_heap_usage
# GC Metrics - this depends on what is available on your JVM
#- mbean: 'java.lang:type=GarbageCollector,name=ConcurrentMarkSweep'
# attributes:
# - attr: CollectionTime
# field: gc.cms_collection_time
# - attr: CollectionCount
# field: gc.cms_collection_count

jmx.application:
jmx.instance:

this seems to be working. there was a typo, slash before api/jolokia

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