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

Allow for handling multiple hashes with STDIN #45

Merged

Conversation

jarretlavallee
Copy link
Contributor

Prior to this commit, the json2timeseriesdb script would fail with the
STDIN input method. The collection script outputs multiple newline
delimited hashes, which caused the JSON parser to fail. This commit
updates the json2timeseriesdb script to be able to handle this input
format.

This can be tested by configuring the metrics collector to ship metrics to a dashboard with something like the following.

  class {'puppet_metrics_collector':
    metrics_server_type => 'influxdb',
    metrics_server_hostname => 'pe-201911-agent.puppetdebug.vlan',
    metrics_server_db_name => 'puppet_metrics',
  }

It fixes the issue when there are multiple masters that are bundled into the same output.

Prior to this commit the json2timeseriesdb script would fail with the
STDIN input method. The collection script outputs multiple newline
delimited hashes, which caused the JSON parser to fail. This commit
updates the json2timeseriesdb script to be able to handle this inpupt
format.
Copy link
Contributor

@tkishel tkishel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

@jarretlavallee
Copy link
Contributor Author

Any objections to merging this?

@tkishel tkishel merged commit 6f67271 into puppetlabs:master Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants