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

When tagging jmx instance with boolean value, jmx fetch has issues. #158

Open
jamiely opened this issue Oct 23, 2017 · 0 comments
Open

When tagging jmx instance with boolean value, jmx fetch has issues. #158

jamiely opened this issue Oct 23, 2017 · 0 comments

Comments

@jamiely
Copy link

jamiely commented Oct 23, 2017

This is with the jmxfetch version in DataDog agent 5.18.1, 0.17.0?

 Running java -Xms50m -Xmx200m -classpath /opt/datadog-agent/agent/checks/libs/jmxfetch-0.17.0-jar-with-dependencies.jar
 org.datadog.jmxfetch.App --check jmx.yaml --check_period 15000 --conf_directory /etc/dd-agent/conf.d --log_level INFO --log_location /var/log/datadog/jmxfetch.log --reporter console --status_loc
ation /opt/datadog-agent/run/jmx_status.yaml list_everything

Reproduction steps:

  1. create a jmx config like:
init_config:
instances:
  - host: localhost
     port: 19000
     tags:
       good: yes
  1. Run sudo /etc/init.d/datadog-agent jmx list_everything

There will be an error like:

Exception in thread "main" java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
        at org.datadog.jmxfetch.Instance.getServiceCheckTags(Instance.java:401)
        at org.datadog.jmxfetch.App.sendServiceCheck(App.java:520)
        at org.datadog.jmxfetch.App.init(App.java:587)
        at org.datadog.jmxfetch.App.main(App.java:126)

Workaround:

Quote the value

init_config:
instances:
  - host: localhost
     port: 19000
     tags:
       good: "yes"
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

No branches or pull requests

1 participant