Hi everyone!
So i'm about to write a little script that makes a simple mysql query, and i want to send the command output via email
Our nagios server is just configured to send email notifications (via an external exchange server, office365) for example when backups are done, but since this feature was not implementated by me, i'm not able to use this service to sending the output of the script. I'm looking on the internet but i can't find useful information, all i can find is info about implementating external software like postfix, ssmtp...
I want use this feature of nagios because is already configured to use a external microsoft mail service, and is working OK. My idea is to write the script, wich it makes the query, and then use the plugin or whatever uses nagios to send mail, as a direct command line
So my question is, wich is the plugin that nagios uses to send mail notifications, or how i can get this script working?
Tons of thanks guys!
Help on sending email notifications
Re: Help on sending email notifications
Our standard commands are notify-service-by-email and notify-host-by-email, but judging by the fact you're sending via SMTP, I'm guessing some prior modification was done. You'll want to take a look at the notification handlers assigned to the contacts in your system. A useful file will most likely be /usr/local/nagios/var/objects.cache.
The second part, is to include the $HOSTOUTPUT$ / $LONGHOSTOUTPUT$ or $SERVICEOUTPUT$ / $LONGSERVICEOUTPUT$ macros to be passed in your notification handler. See this for a full list of macros - https://assets.nagios.com/downloads/nag ... olist.html
The second part, is to include the $HOSTOUTPUT$ / $LONGHOSTOUTPUT$ or $SERVICEOUTPUT$ / $LONGSERVICEOUTPUT$ macros to be passed in your notification handler. See this for a full list of macros - https://assets.nagios.com/downloads/nag ... olist.html
Former Nagios Employee