poxet / Influx-Capacitor

Influx-capacitor collects metrics from windows machines using Performance Counters. Data is sent to influxDB to be viewable by grafana.
http://influx-capacitor.com
MIT License
44 stars 13 forks source link

Adding ability to refresh counter every x minutes/hours #10

Closed zeugfr closed 9 years ago

zeugfr commented 9 years ago

Hi,

I would like to propose a little enhancement : is it possible to add an auto-refresh of all counters (like when I do a "counter list" in the console) in a regular time basis (every x minutes or hours) ? I have for example counters on SQL Server on databases (counter instance = *), so each time I create a new db, I have to refresh the counters to get the new db metrics.

Thanks for your great work !

poxet commented 9 years ago

This is a great idea. It is also needed if you want to monitor processes on the machine.

poxet commented 9 years ago

This feature is completed, but yet not pushed. It will be available from version 1.0.11. Then the instances will be refreshed on every read.

zeugfr commented 9 years ago

Refreshing on every read could perhaps be a problem for large amount of counters with relatively high frequencies (in my tests I got about 850 counters with most of them every 5 secondes and I see it cousumes some cpu resources). Not sure the best option would be (every x read, not more than once a minute, ...).

poxet commented 9 years ago

I was considering every x reads since it would be very easy to implement. I can add that.

poxet commented 9 years ago

From version 1.0.11 it is possible to set the attribute named RefreshInstanceInterval on CounterGroup level.