There are several hosts with partially the same processes running. I check these processes on each host with check_multi. Now, I want to have one service for each process showing the status of all the processes with the same name on different hosts. (E.g. the process Analyse.sh runs on host1, host4 and host7, the service Analyse.sh should now show the status if all are up or not).
Generally, this could be done with a service group, but because I use check_multi, I cannot reach the single subchecks (? or is that possible).
Solution attempts
check the return text from all the check_multi exectuted
how can I get all the return text and implement services?
For every application (i.e. process) to monitor there is one passive service on each host. (hosts times processes)
One checkmulti is executed (check_by_ssh) and does all the checking.
The return value of the check_multi is parsed
A passive service check result is sent for each service in the checkmulti file. For this, I created a script that uses the check_by_ssh command.
However, the parsing of the return value is a little nasty.
Does nagios resp. the check_multi have an option that the return value is already in a format that suits the passive service check result?
It would be gorgeous if I could just pipe the return value of the checkmulti directly to the command file (ie. var/rw/nagios.cmd)!
[quote=“thierry”]However, the parsing of the return value is a little nasty.
Does nagios resp. the check_multi have an option that the return value is already in a format that suits the passive service check result?
It would be gorgeous if I could just pipe the return value of the checkmulti directly to the command file (ie. var/rw/nagios.cmd)![/quote]
Oh, that’s funny, I’m just working on the same idea at the moment
It’s still alpha, but you can see the work in progress here.
The basic idea is to [list]]use the XML output option -r 256 to get structured output/:m] ]add an event handler to the check_multi service/:m] ]feed the Nagios command interface with this eventhandler (PROCESS_FILE, thats faster that piping all commands)/:m][/list:u]
I did some tests for this and managed to feed 10.000 passive services on one Nagios instance.