ageric/nagios — pull request #1 by willixix (2012-08-15 03:08:17+00:00)
Title: Adds SAVEDDATA plugin output support (text after ||) and SERVICESAVEDDATA and HOSTSAVEDDATA macros

As previously discussed on nagios-devel mail list, this patch modifies interpretation of nagios plugin output putting everything after || (which can follow status output directly or follow performance data separated from it by single |) into special data field of service and host objects, which thereafter are available to plugins as $SERVICESAVEDDATA$ and $HOSTSAVEDDATA$ macros.

I was unable to find your most recent development branch code with I/O broker (wproc is over 6 months old...) so this is a patch against 3.41 nagios master code. As this modifies at least one neb function and changes plugin data results interpretation in major way, it is not suitable for 3.x. The code itself is mainly based on how perf_data is dealt with. parse_check_output() function is more than half re-written without use of unsafe strtok (I'd like to remove it from all nagios code actually). I tested the code with development version of check_netint plugin (https://github.com/willixix/WL-NagiosPlugins/blob/master/check_netint.pl) but my plugins only return single line output so this needs more testing with multi-line output plugins. Also documentation for this will need to be written, which I'll do once its clear what 4.0 nagios branch is.