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 601 forks source link

Add multihost support for PostgreSQL collector #646

Open wstranger opened 7 years ago

wstranger commented 7 years ago

Add multihost support for PostgreSQL collector

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 1ebc62f34a3b4e9cf0551df1d29fdfece300932f on wstranger:master into on python-diamond:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling e6d03ba7e67b91cf0e2787d7481e9b2a40876a06 on wstranger:master into on python-diamond:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling b6eb57d1a69d47c678ecd17bd66127cd8e00333e on wstranger:master into on python-diamond:master.

kormoc commented 7 years ago

Can you quickly give a run down on why the multiple collector core code doesn't work for this? Thanks!

wstranger commented 7 years ago

I didn't find any suitable implementation in core and use pgbouncer collector code as reference.

kormoc commented 7 years ago

Hrm. I can't find it documented in the docs :(

Basically, core allows you to spin up multiple instances of any collector via multiple config files of the pattern /etc/diamond/collectors/ExampleCollector - foobar.conf. Every individual config file will be a entirely independent collector process and can be configured as such.

wstranger commented 7 years ago

Ok. At the doc http://diamond.readthedocs.io/en/latest/Getting-Started/Configuration/ - we can see next -

The configuration file name should match the name of the diamond collector class.

Hrm. Nothing about wildcards. Slony, Redis, Elastic, pgbouncer collectors use same way as this one. We are planning to use diamond in docker environment and I'm afraid it is not convenient to manage over 100 configuration files. Thank you.

shortdudey123 commented 7 years ago

PR LGTM now However, i will defer to @kormoc on merging or not