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: scollector.* metrics disabled properly with DisableSelf #1107

Merged
merged 1 commit into from Jul 6, 2015

Conversation

captncraig
Copy link
Contributor

Fixes #1106

@@ -61,8 +63,11 @@ func (c *IntervalCollector) Run(dpchan chan<- *opentsdb.DataPoint) {
slog.Errorf("%v: %v", c.Name(), err)
result = 1
}
Add(&md, "scollector.collector.duration", timeFinish.Seconds(), tags, metadata.Gauge, metadata.Second, "Duration in seconds for each collector run.")
Add(&md, "scollector.collector.error", result, tags, metadata.Gauge, metadata.Ok, "Status of collector run. 1=Error, 0=Success.")
if !DisableSelf {
Copy link
Contributor

Choose a reason for hiding this comment

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

What about using collect.DisableDefaultCollectors instead of adding a new variable? Your choice, just a thought. Otherwise LGTM.

maddyblue added a commit that referenced this pull request Jul 6, 2015
cmd/scollector: scollector.* metrics disabled properly with DisableSelf
@maddyblue maddyblue merged commit 45fa1a0 into master Jul 6, 2015
@maddyblue maddyblue deleted the disableSelf branch July 6, 2015 18:01
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.

None yet

2 participants