I have a nagios distributed setup (operating system is debian wheezy), using ocsp-sweeper (http://exchange.nagios.org/directory/Ad ... er/details) to send check results from distributed instances to the central one, avoiding to fork a nsca client for each check result (ocsp-sweeper reads the pipe at regular intervals and send the results using send_nsca).
I'm wondering if i could set the "ocsp_command" to execute a printf built-in function, instead of my current submit_service_check_result:
Code: Select all
define command {
command_name submit_service_check_result
command_line /usr/bin/printf "%s\t%s\t%s\t%s\x17" "$HOSTNAME$" "$SERVICEDESC$" "$SERVICESTATEID$" "$SERVICEOUTPUT$|$SERVICEPERFDATA$ [$SERVICECHECKCOMMAND$]" >> /var/lib/nagios3/rw/ocsp.cmd
}
Code: Select all
sh -c /usr/bin/printf "%s\t%s\t%s\t%s\x17" "$HOSTNAME$" "$SERVICEDESC$" "$SERVICESTATEID$" "$SERVICEOUTPUT$|$SERVICEPERFDATA$ [$SERVICECHECKCOMMAND$]" >> /var/lib/nagios3/rw/ocsp.cmd