src/utils_threshold.c: Percentage support in thresholds
authorAndrés J. Díaz <ajdiaz@connectical.com>
Mon, 6 Jul 2009 15:53:03 +0000 (17:53 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Mon, 6 Jul 2009 15:53:03 +0000 (17:53 +0200)
commitf49370d16f2b7f1bb9bdf5c6ebc990827c657801
treeb2ae2c4dc48ea63929836374771db9bf3548f264
parentfa9fd186f4e09c24a02d9541c2409d21bf282087
src/utils_threshold.c: Percentage support in thresholds

Hi all!

I attach a patch to add percentage support in thresholds, like this example:

<Threshold>
  <Type df>
   WarningMax 90
   Percentage true
 </Type>
</Threshold>

The percentage option works like collectd-nagios, that is, calculate the
percentage of the value of the first DS over the total. For df plugin,
for example,
calculate the percentage of the "used" DS.

Bugs and suggestions are welcome :)

Enjoy!

Regards,
  Andres
src/utils_threshold.c