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

Trim whitespace from check output in opentsdb transformer #1458

Merged
merged 1 commit into from
May 8, 2018

Conversation

nikkictl
Copy link

@nikkictl nikkictl commented May 7, 2018

Signed-off-by: Nikki Attea nikki@sensu.io

What is this change?

Fixed a small bug in the opentsdb transformer so that it trims trailing whitespace characters.

Why is this change necessary?

Check output containing one or multiple metrics in opentsdb metric format can also contain trailing whitespace or newline characters. We should not attempt to parse the newline character for a metric, rather we should ignore it.

Does your change need a Changelog entry?

Yas.

Do you need clarification on anything?

Nah.

Were there any complications while making this change?

Nah.

…ases with whitespace

Signed-off-by: Nikki Attea <nikki@sensu.io>
@nikkictl nikkictl requested a review from palourde May 7, 2018 18:42
@nikkictl nikkictl self-assigned this May 7, 2018
Copy link
Contributor

@palourde palourde left a comment

Choose a reason for hiding this comment

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

Good catch!

Did you tried that on other transformers? I'm worried I forgot that for others 😟

@nikkictl
Copy link
Author

nikkictl commented May 7, 2018

@palourde yes I added test cases for all transformers with trailing whitespaces. I believe the nagios transformer is unaffected since we do not attempt to parse multiple lines of it.

@nikkictl nikkictl merged commit 4cc70f5 into master May 8, 2018
@nikkictl nikkictl deleted the bugfix/metric-trailing-whitespace branch May 8, 2018 14:52
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.

3 participants