-
Notifications
You must be signed in to change notification settings - Fork 597
Allow precision to be set in nginx collector #509
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
Allow precision to be set in nginx collector #509
Conversation
|
Oh dear, failing tests! They look like some pretty obvious PEP-8 violations. I've got max-line-length=120 set in my flake8 config file so it didn't pick them up. I'll get them fixed up right now. As an aside, are there any docs I can refer to about running the tests locally? |
ba1445b to
11cdeff
Compare
|
|
||
| def get_default_config(self): | ||
| default_config = super(NginxCollector, self).get_default_config() | ||
| default_config['precision'] = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add to the config_help section to
|
Doc needs to be updated too |
|
Thanks for the feedback! I'm away from a computer for the weekend but will address the issues on Monday. On 29 Jul 2016 18:55, Grant Ridder notifications@github.com wrote: Doc needs to be updated too — |
11cdeff to
2298b04
Compare
|
Docs and config_help updated. I used the same wording for precision as in the NTP collector. |
|
LGTM |
|
Hey @shortdudey123, @jaingaurav, do you know when you'll have a chance to take another look at this? Thanks! |
|
Already looks good to me |
rowleyaj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've had these changes running in our environment for a while now. Any chance someone can get this merged into master, or provide feedback as to what changes are needed?
|
@jaingaurav Any chance you could take a quick look at this please? It's been ready and waiting for a few months now. |
|
@bmhatfield can you review when you have a change? :) |
|
@bmhatfield @shortdudey123 @josegonzalez Any updates on what's needed to get this PR merged. This is now the only custom part of the diamond install that we have. |
|
Seems legit, will go out in the next release when I have a moment. |
This patch allows us to set precision in the Nginx collector's config file. Eg:
Changing the precision from 0 to 2 resulted in this change on a testing system when viewing the data in Grafana:
Note that the number of requests/sec hasn't changed, just the precision config value.
When you hover over a datapoint in Grafana:
Some point in time before the patch:
After the patch and changing the config value (with requests coming in at the same rate):