Add custom message for threshold and missings.
Hi everybuddy
Add two new options in thresholds, the Message which can define a custom
message for thresholds and MissingMessage, which define a custom message for
missing interesting values related with that threshold.
This work is heavly based on previously custom message patch publishded by
Taizo ITO on Mar-2010 [1]. The code was modify to add more patterns and keep
compatibility with target_notification syntax. Also now we have
a MissingMessage too.
The pattern matching code was moved to a new function in utils_threshold.c
(ut_build_message) which create the message string.
New patterns:
%{ds:<name>} returns values for ds called "name", as target_notification
does.
%{value} return the offending value for the threshold.
%{data_source} return the datasource name for offending value
%{hysteresis} return the hysteresis parameter value
%{hits} return the hits parameter value
[1] http://www.mail-archive.com/collectd@verplant.org/msg00569.html
Thanks again to Taizo for the previously work :)
Enjoy!