I've written a small script used to send email out of Nagios. I want to pass a parameter to this script that indicates if the email should be high or normal priority.
My contacts are all derived from this template.
The check command is
command_line /usr/bin/perl /usr/lib/nagios/plugins/send_email.pl \
--smtp <My Host> --from "no-reply@MyDomain.org" --email "$CONTACTEMAIL$" \
--subject "$HOSTADDRESS$ $HOSTSTATE$" \
--body "$HOSTADDRESS$: $HOSTSTATE$ \n$HOSTOUTPUT$\n$LONGHOSTOUTPUT$\n$NOTIFICATIONCOMMENT$" \
<whatever I need for a priority to pass>
The script works but I don't have any idea how to pass something from a specific service or host check all the way back to this point or if it even possible. Please help.