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
Passing contact macro to external script
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Passing contact macro to external script
Hi, @mcitunixops. You could try the $CONTACTEMAIL$ macro. I guess the command would look like this:
Let me know if that works.
https://assets.nagios.com/downloads/nag ... ntactemail
Code: Select all
$USER1$/checkSpaceUsage.sh $SERVICESTATE$ $HOSTADDRESS$ $SERVICEDESC$ $CONTACTEMAIL$https://assets.nagios.com/downloads/nag ... ntactemail
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.