NSCA and nagios Macros inconsistency

Matthieu Parisot mat at avedya.com
Fri Jan 24 12:53:55 CET 2003


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 SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list