Metricbeat Jolokia module - same for multiple agents

I use jolokia module with auto-discovery while the metrics are scrapped from multiple agents. The metrics are properly exported to Elasticsearch, however if I have a few agents from which I collect the same metrics and my condition is based on partial name then all the events are exported with the same .
In more details: assume I have 2 different agents - one has called myapp1 and the second myapp2.
My metricbeat.yml configuration looks like that:

- type: jolokia
- condition:
contains: "myapp"
- module: jolokia
metricsets: ["jmx"]

Pay attention that the condition " myapp" applies to my both agents (myapp1 and myapp2) and indeed the metrics are coming from both properly. However, and jolokia.url values are the same (lets say those from myapp1) in all events, i.e. also in those which belong to myapp2. I intentionally use "myapp" condition as the configuration is identical to both of them and thus my metricbeat.yml is much simpler (no need to duplicate the same configuration). BTW, service.address is correct. I actually lose identification from where my metrics came, so this is important to me.

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