Hello!
I'm going to use nagios to send me phone calls via Asteriks.
I'm going to use eventhandler for - bash script.
Is it possible to use Nagios macros (like $CONTACTMAIL$) in bash script somehow?
Thank you
nagios macros in scripts
Re: nagios macros in scripts
You can't use them directly within the script itself, but you can certainly pass them in as bash parameters in the event handler, then within the script use $1, $2, etc to get them.
Former Nagios employee
Re: nagios macros in scripts
It is *technically* possible to use them directly, but you will have to set certain environment variables first and that will cause some potential load issues.
Former Nagios employee
Re: nagios macros in scripts
thank you, I'm completely OK with parameters for scripts
Re: nagios macros in scripts
Great! I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee