Page 1 of 1

[Nagios-devel] NSCA and nagios Macros inconsistency

Posted: Fri Jan 24, 2003 3:54 am
by Guest
Hi list,
I use nsca to get results from my production environement;
I've created a checkcommand like this:
# 'export_nsca' command definition
define command{
command_name export_nsca
command_line echo -e
"$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$OUTPUT$" |
[..path..]/send_nsca mydomain.com -p myport myconfig
}
that way I just have to add everytime the same service_definition option :
event_handler export_nsca

Unhopefully, $SERVICESTATE$ is replaced by a string ("OK", "CRITICAL"
...) and as nsca is waiting for an integer, it does not work.
For now, I'm using a shell trick so that it works, but I think that
Nagios should definitly has a $SERVICESTATEVALUE$ macro or whatever, which
would be usable eveywhere that $SERVICESTATE$ is...
The alternative is also to modify nsca and send_nsca, but at the end of
the day, it could be more usefull in nagios itself.
Any comments / Thoughts ?

Matthieu Parisot

PS: Please reply on the user list, i've not suscribed to devel list.






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]