Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the name if provided to identify the instance in toString() #255

Merged
merged 1 commit into from
Nov 29, 2019

Conversation

remeh
Copy link
Contributor

@remeh remeh commented Nov 29, 2019

When a JMX check is running on an address:port and no other identifiers is provided, the address:port is used as an identifier.

However, it could not be unique because we want to be able to run multiple JMX instances on the same JVM.

This PR modify the Instance.toString() method to use the name if one has been provided in the instance configuration, letting somebody run multiple instances of jmxfetch listening to the same JVM if a name is provided on the instances.

Would provide a clean workaround for #253

When a JMX check is running on an `address:port` and no other
identifiers is provided, the `address:port` is used as an identifier.

However, it could not be unique because we want to be able to run
multiple JMX instances on the same JVM.

This PR modify the `Instance.toString()` method to use the name if one
has been provided in the instance configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants