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

align metric naming scheme output #46

Closed
wants to merge 1 commit into from

Conversation

henkjan
Copy link

@henkjan henkjan commented Feb 20, 2018

Pull Request Checklist

Is this in reference to an existing issue?

General

  • Update Changelog following the conventions laid out here

  • Update README with any necessary configuration snippets

  • Binstubs are created if needed

  • RuboCop passes

  • Existing tests pass

New Plugins

  • Tests

  • Add the plugin to the README

  • Does it have a complete header as outlined here

Purpose

Known Compatibility Issues

@henkjan henkjan force-pushed the align-scheme-output branch from 7b9546b to 7a9b2f6 Compare February 20, 2018 21:11
@majormoses
Copy link
Member

Thanks for your contribution to Sensu plugins! Without people like you submitting PRs we couldn't run the project. I will review it shortly.

@majormoses
Copy link
Member

fixes #47

Copy link
Member

@majormoses majormoses left a comment

Choose a reason for hiding this comment

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

Overall this looks good, however this causes a breaking change as it changes the metrics in a way that might require a user to need to adjust their config. We need to call this out in the changelog per our guidelines. Also we need to be careful to not leave empty metric path when database is not specified.

@@ -113,7 +113,7 @@ def lag_compute(res1, res, m_segbytes) # rubocop:disable NestedMethodDefinition

# Compute lag
lag = lag_compute(res1, res, m_segbytes)
output config[:scheme].to_s, lag
output "#{config[:scheme]}.replication.#{config[:database]}.to_s", lag
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change as it completely changes the metric output and people may have queries that have alerts on them, this needs to be a major version bump which I will do post acceptance.

output "#{config[:scheme]}.bgwriter.maxwritten_clean", row['maxwritten_clean'], timestamp
output "#{config[:scheme]}.bgwriter.buffers_backend", row['buffers_backend'], timestamp
output "#{config[:scheme]}.bgwriter.buffers_alloc", row['buffers_alloc'], timestamp
output "#{config[:scheme]}.bgwriter.#{config[:database]}.checkpoints_timed", row['checkpoints_timed'], timestamp
Copy link
Member

Choose a reason for hiding this comment

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

what if they don't specify a database name? I think we need to check if it is set and then change the output on it.

Copy link
Member

@majormoses majormoses left a comment

Choose a reason for hiding this comment

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

Aside from the comments I left we need to call out the breaking changes in the changelog per our guidelines

@majormoses
Copy link
Member

closing due to inactivity, to see this work over the line either re-open this pull request or open a new one.

@majormoses majormoses closed this Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants