Module: check_mk
Branch: master
Commit: 7811ad93c493b5057ad033ed1557f19a2876aaa3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7811ad93c493b5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Nov 5 14:23:33 2014 +0100
#1507 New optional parse_function for check API
When developing your own checks you sometimes need to deal
with more complex agent output that needs first to be parsed
before that actual inventory or check logic can begin to do
its works. Many checks therefore have something like a parse
function. Now you can define a <tt>"parse_function"</tt> in
the <tt>check_info</tt>. If you do that, then all agent
output (the parameter <tt>info</tt>) will always be processed
by that function before it is passed to the inventory or
check function.
Note: this is also a performance benefit since the parsing
needs now only be done once and not again for each single
check item.
Please refer to the developer documentation for more
details.
---
.werks/1507 | 24 ++++++++++++++++++++++++
ChangeLog | 1 +
checks/multipath | 24 +++++++++++++++---------
modules/check_mk.py | 9 +++++++++
modules/check_mk_base.py | 43 ++++++++++++++++++++++++++++++-------------
5 files changed, 79 insertions(+), 22 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=7811ad93c4…