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

cmd/scollector: Record the current_source as a tag rather than a separate metric. #1782

Closed
wants to merge 1 commit into from

Conversation

alienth
Copy link
Contributor

@alienth alienth commented Jun 15, 2016

Currently, things like ntp.offset are of limited use by themselves. You can't tell which remote the metric is measured against without cross-referencing against ntp.current_source, which seems a bit silly.

This change will allow us to alert things like ntp.offset properly with much more ease, as we can simply filter it using the tag rather than cross referencing. The ntp.current_source metric is currently entirely unused in our config.

👓 @kylebrandt / @captncraig

if fl == "*" {
current_source = 1
tags = tags.Merge(opentsdb.TagSet{"current_source": "1"})
Copy link
Member

Choose a reason for hiding this comment

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

Conditional tags are generally a bad idea. It will trigger unknowns when you alert on metric{foo=*,current_source=*} when things switch, because that tagset will have "disappeared".

So it would be better to always have the tagkey present and have a value of "true" / "false".

Even with that change, I'm not sure we need an additional metric so would like to see what you are trying to do.

If we do go ahead with make it an additional tag, I would add a new metric most likely so the behavior doesn't change if other people are alerting on the metric.

@stale
Copy link

stale bot commented Oct 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 1, 2020
@stale stale bot closed this Oct 31, 2020
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.

None yet

3 participants