Page 1 of 1

wanting to put more information in Notification Messages

Posted: Tue Dec 15, 2020 6:49 am
by btayl
Can I have in a bash script output the error code and text passed to it like "test job 5 is down" from a bash script
and see it in Notification Messages with the error code and the text ?

I have a script the checks an application for over a 1000 lets call them services if one or more are down and if one is is down it bring the name that is down and would like to send that with the email.

Example bash script
text="this is a test"
STATE_CRITICAL=2
echo $text
exit $STATE_CRITICAL

Re: wanting to put more information in Notification Messages

Posted: Wed Dec 16, 2020 12:45 pm
by vtrac
Hi btayl,
Looking at the ticket, I'm sorry but I am still not quite understand of what and how you are running your script.
From what I know, Nagios XI do have the "Notification Management" page that you can manage your alert (notification) messages.

Nagios XI > Click on your "username" (upper right corner) > Notification Messages

Below are "Standard Marcos in Nagios" and "Understanding Notification Variables" that you can use to custom your notification messages:
https://assets.nagios.com/downloads/nag ... olist.html
https://assets.nagios.com/downloads/nag ... iables.pdf

If you need more helps, please include your script and more info (pictures) of what you are trying to do.

Best Regards,
Vinh

Re: wanting to put more information in Notification Messages

Posted: Wed Dec 16, 2020 2:01 pm
by btayl
This One can be closed

Re: wanting to put more information in Notification Messages

Posted: Wed Dec 16, 2020 2:10 pm
by vtrac
Great!! ..... Please let us know if there is anything else we can help!!

Vinh