$SERVICESTATE$ returns empty?


Hi, i added a new event_handler to nagios ant nagios runs it if necessary. The problem is that nagios is not handing over the required variables.

my command definition is:

define command{ command_name restart_service_ipsec command_line /etc/nagios/scripts/restart_service $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ ipsec }

and in the beginning of the executed script ** /etc/nagios/scripts/restart_service** I have this:

ant that shows me that nagios is not handling over the parameters $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ because the log file looks like this:

/etc/nagios/scripts/restart_service $ $ $ ipsec /etc/nagios/scripts/restart_service $ $ $ ipsec

PS: linux, nagios 3.1.0