-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Open
Description
Summary
When using the jolokia2_proxy input plugin with a Jolokia 2.x proxy server, the jolokia_agent_url tag is missing from metrics. This makes it impossible to distinguish metrics from different proxy targets.
Root Cause
Jolokia 2.x changed the response format for proxy requests. The target URL is now returned under request.options.target instead of request.target (Jolokia 1.x format).
Jolokia 1.x response:
{
"request": {
"target": {
"url": "service:jmx:rmi:///jndi/rmi://target:9010/jmxrmi"
}
}
}Jolokia 2.x response:
{
"request": {
"options": {
"target": {
"url": "service:jmx:rmi:///jndi/rmi://target:9010/jmxrmi"
}
}
}
}The current code only checks request.target, so it never finds the target URL when using Jolokia 2.x.
Expected Behavior
The jolokia_agent_url tag should be present on metrics regardless of whether Jolokia 1.x or 2.x is used.
Affected Versions
- Telegraf: All versions
- Jolokia: 2.0.0+ (released December 2023)
Workaround
Use separate [[inputs.jolokia2_proxy]] blocks with explicit [inputs.jolokia2_proxy.tags] for each target.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels