Skip to content

Conversation

@scottcunningham
Copy link
Contributor

@scottcunningham scottcunningham commented Jul 29, 2016

This patch allows us to set precision in the Nginx collector's config file. Eg:

enabled = True
precision = 2
req_port = 9080

Changing the precision from 0 to 2 resulted in this change on a testing system when viewing the data in Grafana:

asdf

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:

    asdf

  • After the patch and changing the config value (with requests coming in at the same rate):

    asdf

@scottcunningham
Copy link
Contributor Author

scottcunningham commented Jul 29, 2016

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?

@scottcunningham scottcunningham force-pushed the nginx_collector_precision_fix branch from ba1445b to 11cdeff Compare July 29, 2016 14:57
@coveralls
Copy link

coveralls commented Jul 29, 2016

Coverage Status

Coverage remained the same at 59.386% when pulling 11cdeff on Ensighten:nginx_collector_precision_fix into fa8da84 on python-diamond:master.


def get_default_config(self):
default_config = super(NginxCollector, self).get_default_config()
default_config['precision'] = 0
Copy link
Member

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

@shortdudey123
Copy link
Member

Doc needs to be updated too

@scottcunningham
Copy link
Contributor Author

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


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@scottcunningham scottcunningham force-pushed the nginx_collector_precision_fix branch from 11cdeff to 2298b04 Compare August 1, 2016 14:21
@scottcunningham
Copy link
Contributor Author

Docs and config_help updated. I used the same wording for precision as in the NTP collector.

@coveralls
Copy link

coveralls commented Aug 1, 2016

Coverage Status

Coverage remained the same at 59.386% when pulling 2298b04 on Ensighten:nginx_collector_precision_fix into fa8da84 on python-diamond:master.

@shortdudey123
Copy link
Member

LGTM
@jaingaurav can you review?

@scottcunningham
Copy link
Contributor Author

Hey @shortdudey123, @jaingaurav, do you know when you'll have a chance to take another look at this? Thanks!

@shortdudey123
Copy link
Member

Already looks good to me
Waiting on @jaingaurav or another python-diamond member to merge

shawnbutts added a commit to Netuitive/netuitive-diamond that referenced this pull request Sep 22, 2016
Copy link

@rowleyaj rowleyaj left a 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?

@scottcunningham
Copy link
Contributor Author

@jaingaurav Any chance you could take a quick look at this please? It's been ready and waiting for a few months now.

@shortdudey123
Copy link
Member

@bmhatfield can you review when you have a change? :)

@rowleyaj
Copy link

@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.

@josegonzalez josegonzalez merged commit ab59e12 into python-diamond:master Jan 12, 2017
@josegonzalez
Copy link
Member

Seems legit, will go out in the next release when I have a moment.

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.

5 participants