########################################################### # NOTIFICATION DEFINITIONS ########################################################### # 'notify-host-by-email' command definition ########################################################### define command{ command_name notify-host-by-email command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$ } ########################################################### # 'host-email-text-en' command definition # sends plaintext e-mails in English ########################################################### define command{ command_name host-email-text-en command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" } ########################################################### # 'host-email-html-int-en' command definition # sends HTML e-mails in English and includes Nagios URL for Intranet access ########################################################### define command{ command_name host-email-html-int-en command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f html -u } ########################################################### # 'host-email-html-ext-en' command definition # sends HTML e-mails in English and does not provide Nagios URL's ########################################################### define command{ command_name host-email-html-ext-en command_line /srv/app/nagios/etc/objects/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f html } ########################################################### # 'host-email-multi-int-en' command definition # sends multipart HTML e-mails in English with Nagios URL's ########################################################### define command{ command_name host-email-multi-int-en command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f multi -u } ########################################################### # 'host-email-multi-ext-en' command definition # sends multipart HTML e-mails in English w/o Nagios URL's ########################################################### define command{ command_name host-email-multi-ext-en command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f multi } ########################################################### # 'host-email-graph-int-en' command definition, sends # multipart HTML e-mails in English w Nagios URL's & graphs ########################################################### define command{ command_name host-email-graph-int-en command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph -u } ########################################################### # 'host-email-graph-ext-en' command definition, sends # multipart HTML e-mails + graph in English w/o Nagios URLs ########################################################### define command{ command_name host-email-graph-ext-en command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph } ########################################################### # 'host-email-text-jp' command definition # sends plaintext e-mails in Japanese ########################################################### define command{ command_name host-email-text-jp command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" -l jp } ########################################################### # 'host-email-html-int-jp' command definition # sends HTML e-mails in Japanese with Nagios URL for Intranet access ########################################################### define command{ command_name host-email-html-int-jp command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f html -u -l jp } ########################################################### # 'host-email-html-ext-jp' command definition # sends HTML e-mails in Japanese without Nagios URL's ########################################################### define command{ command_name host-email-html-ext-jp command_line /srv/app/nagios/etc/objects/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f html -l jp } ########################################################### # 'host-email-multi-int-jp' command definition # sends multipart HTML e-mails in Japanese with Nagios URL's ########################################################### define command{ command_name host-email-multi-int-jp command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f multi -u -l jp } ########################################################### # 'host-email-multi-ext-jp' command definition # sends multipart HTML e-mails in Japanese w/o Nagios URL's ########################################################### define command{ command_name host-email-multi-ext-jp command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f multi -l jp } ########################################################### # 'host-email-graph-int-jp' command definition, sends # multipart HTML e-mail in Japanese w. Nagios URL's & graph ########################################################### define command{ command_name host-email-graph-int-jp command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph -u -l jp } ########################################################### # 'host-email-graph-ext-jp' command definition, sends # multipart HTML e-mail + graph, Japanese w/o Nagios URL's ########################################################### define command{ command_name host-email-graph-ext-jp command_line /srv/app/nagios/libexec/nagios_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph -l jp } ########################################################### # 'notify-service-by-email' command definition ########################################################### define command{ command_name notify-service-by-email command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ } ########################################################### # 'service-email-text-en' command definition # sends plaintext e-mails in English ########################################################### define command{ command_name service-email-text-en command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" } ########################################################### # 'service-email-html-int-en' command definition # sends HTML e-mails in English with Nagios URL for Intranet access ########################################################### define command{ command_name service-email-html-int-en command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f html -u } ########################################################### # 'service-email-html-ext-en' command definition # sends HTML e-mails in English without Nagios URL's ########################################################### define command{ command_name service-email-html-ext-en command_line /srv/app/nagios/etc/objects/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f html } ########################################################### # 'service-email-multi-int-en' command definition # sends multipart HTML e-mails in English with Nagios URL's ########################################################### define command{ command_name service-email-multi-int-en command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -p "ACME Corporation, London Branch" \ -c "$CONTACTADDRESS1$" \ -f multi -u } ########################################################### # 'service-email-multi-ext-en' command definition # sends multipart HTML e-mails in English w/o Nagios URL's ########################################################### define command{ command_name service-email-multi-ext-en command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f multi } ########################################################### # 'service-email-graph-int-en' command definition, sends # multipart HTML e-mails, English with Nagios URL's + graph ########################################################### define command{ command_name service-email-graph-int-en command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -p "ACME Corporation, London Branch" \ -c "$CONTACTADDRESS1$" \ -f graph -u } ########################################################### # 'service-email-graph-ext-en' command definition, sends # multipart HTML e-mail + graph, English w/o Nagios URL's ########################################################### define command{ command_name service-email-graph-ext-en command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph } ########################################################### # 'service-email-text-jp' command definition # sends plaintext e-mails in Japanese ########################################################### define command{ command_name service-email-text-jp command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" -l jp } ########################################################### # 'service-email-html-int-jp' command definition # sends HTML e-mails in Japanese with Nagios URL for Intranet access ########################################################### define command{ command_name service-email-html-int-jp command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f html -u -l jp } ########################################################### # 'service-email-html-ext-jp' command definition # sends HTML e-mails in Japanese without Nagios URL's ########################################################### define command{ command_name service-email-html-ext-jp command_line /srv/app/nagios/etc/objects/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f html -l jp } ########################################################### # 'service-email-multi-int-jp' command definition # sends multipart HTML e-mails in Japanese with Nagios URL's ########################################################### define command{ command_name service-email-multi-int-jp command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f multi -u -l jp } ########################################################### # 'service-email-multi-ext-jp' command definition # sends multipart HTML e-mails in Japanese w/o Nagios URL's ########################################################### define command{ command_name service-email-multi-ext-jp command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f multi -l jp } ########################################################### # 'service-email-graph-int-jp' command definition, sends # multipart HTML e-mails, Japanese with Nagios URL's & graph ########################################################### define command{ command_name service-email-graph-int-jp command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph -u -l jp } ########################################################### # 'service-email-graph-ext-jp' command definition, sends # multipart HTML e-mail + graph, Japanese w/o Nagios URL's ########################################################### define command{ command_name service-email-graph-ext-jp command_line /srv/app/nagios/libexec/nagios_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph -l jp } ########################################################### # Below are example definitions for the PNP4Nagios scripts ########################################################### ########################################################### # 'host-pnp4n-graph-int-jp' command definition, sends # multipart HTML e-mail + graph, Japanese with Nagios URL's ########################################################### define command{ command_name host-pnp4n-graph-int-jp command_line /srv/app/nagios/libexec/pnp4n_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph -u -l jp } ########################################################### # 'host-pnp4n-graph-int-en' command definition, sends # multipart HTML e-mail + graph, English with Nagios URL's ########################################################### define command{ command_name host-pnp4n-graph-int-en command_line /srv/app/nagios/libexec/pnp4n_send_host_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph -u -l en } ########################################################### # 'service-pnp4n-graph-int-jp' command definition, sends # multipart HTML e-mail + graph, Japanese with Nagios URL's ########################################################### define command{ command_name service-pnp4n-graph-int-jp command_line /srv/app/nagios/libexec/pnp4n_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph -u -l jp } ########################################################### # 'service-pnp4n-graph-int-en' command definition, sends # multipart HTML e-mail + graph, English with Nagios URL's ########################################################### define command{ command_name service-pnp4n-graph-int-en command_line /srv/app/nagios/libexec/pnp4n_send_service_mail.pl \ -c "$CONTACTADDRESS1$" \ -f graph -u -l en }