python-diamond / Diamond

Diamond is a python daemon that collects system metrics and publishes them to Graphite (and others). It is capable of collecting cpu, memory, network, i/o, load and disk metrics. Additionally, it features an API for implementing custom collectors for gathering metrics from almost any source.
http://diamond.readthedocs.org/
MIT License
1.74k stars 600 forks source link

Support for nginx+ status endpoint #475

Closed travisgroth closed 7 years ago

travisgroth commented 8 years ago

The commercial subscription for nginx offers a much more detailed status endpoint and I'd like to get that data into diamond. I presently have most of the code ready.

The dataset and format is completely different than the normal nginx status info, but the options and testing strategy is pretty similar. Is there a project preference for...

(a) Adding nginx+ support to the existing nginx collector, either automatically determined or set by a config option and updating tests/documentation

or

(b) Creating an entirely separate nginxplus collector, test cases, and documentation

I can put together a PR for either approach.

shortdudey123 commented 8 years ago

Option A sounds good to me You can detect which is which based on the Content-Type response header (application/jsonfor nginx+ vs text/html for nginx)