views:

92

answers:

1

I use MRTG to monitor vital stats on my servers like disk space, CPU load, memory usage, temperatures etc.

It all works fine and well for parameters that don't change rapidly.

By running small VB script I can also get any Performance Counter. However these scripts are called by MRTG every 5 minutes while performance counters like physical disk idle time return a snapshot value from previous few seconds so a lot or data is missed.

Surely I could write a service that would poll all required counters in background and store average values somewhere on disk where MRTG would pick them up.

However before I do so I would like to find out if there is some ready solution that would allow me to get average value of some counter for the last 5 minutes as opposed to immediate snapshot.

+1  A: 

the trick is the use raw WMI counters as you are polling your data. MSDN has some info on this to get your started: http://msdn.microsoft.com/en-us/library/xb29hack(VS.71).aspx. And here is some VB ode on this: http://msdn.microsoft.com/en-us/library/f77ezfb7(v=VS.71).aspx

Tobi Oetiker