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

feedpositionAnalyzer: set metrics to 0 when source not at night time #109

Open
nritsche opened this issue Jun 20, 2019 · 2 comments
Open
Assignees
Labels
analyzer Add a new Analyzer bug Something isn't working metric Related to prometheus metrics

Comments

@nritsche
Copy link
Contributor

In line 228, set all metrics to 0 that use source as a label. Otherwise the value stays at what it was the last time this source was found to be at night time.

@nritsche nritsche added bug Something isn't working analyzer Add a new Analyzer metric Related to prometheus metrics labels Jun 20, 2019
@cahofer
Copy link
Contributor

cahofer commented Aug 8, 2019

If I understand correctly, then I think we should set the metrics all to zero when analyzer is run? e.g. in line 223
self.percent_metric.labels(source=src).set(0)
self.freq_metric.label(source=src).set(0)

The line you indicated is just if it found a night transit but no data. @nritsche

@nritsche
Copy link
Contributor Author

nritsche commented Aug 8, 2019

Okay, whatever works. At the moment the analyzer does not change the metric in that specific case and it just stays at whatever it was on the last run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer Add a new Analyzer bug Something isn't working metric Related to prometheus metrics
Projects
None yet
Development

No branches or pull requests

2 participants