Skip to content

Conversation

@elohmeier
Copy link
Contributor

Summary

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).

This change adds support for both formats by checking both locations when extracting the target URL for the jolokia_agent_url tag.

Without this fix, metrics from jolokia2_proxy plugin using Jolokia 2.x are missing the jolokia_agent_url tag, making it impossible to distinguish metrics from different proxy targets.

Checklist

Related issues

resolves #18194

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Jan 7, 2026

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Jan 7, 2026
@elohmeier
Copy link
Contributor Author

!signed-cla

@mstrandboge mstrandboge self-assigned this Jan 8, 2026
@mstrandboge
Copy link
Member

Thanks for the PR! The code looks good to me, but could you resolve the linter issues? Thanks!

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).

This change adds support for both formats by checking both locations
when extracting the target URL for the `jolokia_agent_url` tag.

Without this fix, metrics from jolokia2_proxy plugin using Jolokia 2.x
are missing the `jolokia_agent_url` tag, making it impossible to
distinguish metrics from different proxy targets.
@elohmeier elohmeier force-pushed the fix/jolokia2-proxy-target-tag branch from cf49a86 to 90e4238 Compare January 9, 2026 05:14
@elohmeier
Copy link
Contributor Author

Thanks for the review @mstrandboge. Should be fixed now!

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Jan 9, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix pr to fix corresponding bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jolokia2_proxy: Missing jolokia_agent_url tag with Jolokia 2.x proxy

2 participants