[collectd] thresholding: sensors returning N distinct states, possible improvements

Josef Liška jl at chl.cz
Fri Dec 12 17:40:11 CET 2014

Hi List,

in our application we have sensors connected on modbus or snmp, which
are returning their "state". It is a number and there are
several possible values. So far so good. But for notifications, we need
to assign states to OK, Warning, Failure non-linearly,
like this:
0 - Failure
1 - OK
2 - Warning
3 - Failure
4 - OK

IFAIK it is not possible to achieve with current collectd capabilities.

We intend to extend threshold plugin to allow following:

- Add WarningValues config option with comma or space separated list of
values to trigger a warning
- Add FailureValues config option with comma or space separated list of
values to trigger a failure
  These options should be mutually exclusive with [WarningMin,
WarningMax, FailureMin, FailureMax]

We are also thinking about adding possibility to have more than one
threshold per sensor. We would add tag, label or name
to threshold, which would be then propagated to notifications.

Possible use cases include:
- warning some people earlier than others, e.g. warn staff members
first, but when value rises further warn boss.
- humanize resulting notifications - add text based on threshold level

Our questions:

- did anyone do some development in that direction?
- are there any suggestions in general?

Best regards
Josef Liska

More information about the collectd mailing list