Passing contact macro to external script
Posted: Wed Jan 31, 2018 7:55 pm
Hi,
Is there a way to pass a MACRO to an external script when using event handler?
I see the option "$CONTACTEMAIL:johndoe$". But is since we have assigned a contact for a service or host already, i want it to pass the value that is assigned already instead of me manually enter the user name and passing it to the external script. My command looks like this.
$USER1$/checkSpaceUsage.sh $SERVICESTATE$ $HOSTADDRESS$ $SERVICEDESC$ $CONTACTEMAIL:johndoe$
I am basically calling a command ( then runs a script) on the remote host to run some command and then send a email based on the service or host contact that is predefined already in nagios
Is there a way to pass a MACRO to an external script when using event handler?
I see the option "$CONTACTEMAIL:johndoe$". But is since we have assigned a contact for a service or host already, i want it to pass the value that is assigned already instead of me manually enter the user name and passing it to the external script. My command looks like this.
$USER1$/checkSpaceUsage.sh $SERVICESTATE$ $HOSTADDRESS$ $SERVICEDESC$ $CONTACTEMAIL:johndoe$
I am basically calling a command ( then runs a script) on the remote host to run some command and then send a email based on the service or host contact that is predefined already in nagios