How to send additional information in an email alert


#1

Hi folks,

Normally the notify-service-by-email command is going to put the $SERVICEOUTPUT$ text in the body of the message, which is the same output that goes to the Nagios console. Let’s say that I wanted one piece of info to go to the console, and a different piece (much longer) to go to the body of the email. Is there an easy way to do this? Let’s say maybe I have the plugin write a file out, could I pass that file name in to the notify-service-by-email command, or a modified version?

Thanks,

  -Adam

#2

nagios.sourceforge.net/docs/3_0/ … viceoutput

$SERVICEOUTPUT$ The first line of text output from the last service check (i.e. “Ping OK”).
$LONGSERVICEOUTPUT$ The full text output (aside from the first line) from the last service check.


#3

Thank you very much luca, that looks like exactly what I needed, I’ll try it. :slight_smile: