[op5-users] op5 plugin: notify
Tom Welsh
twelsh37 at gmail.com
Wed Oct 21 20:45:23 CEST 2009
Hi Mirza,
These are the default notifications setup when you install Nagios.
Full documentation for the notifications can be found in the Nagios
doumentation at
http://nagios.sourceforge.net/docs/3_0/notifications.html
As for customising the notification its just a case of reading the docs
and changing the macros accordingly.
for example on some systems mail does not live in /usr/bin/mail you
should try setting up these notifications yourself, check paths to te
relevant commands and make sure you recieve mails when you send them.
After that its just a case of configuring them to send what you the
information you need. All the macros can be found on the following page
of the Nagios documentation
http://nagios.sourceforge.net/docs/3_0/macrolist.html
Hope this helps
Tom
On Wed, 2009-10-21 at 10:26 -0700, Mirza Dedic wrote:
> Hello,
>
> Has anyone successfully got the notify plugin to work in their Nagios/Ninja/Merlin environment? While I do like the default template with Nagios, I think having it as extensive and eaze-of-control as this plug-in allows would be a great add-on.
>
> Currently I am setup with Nagios (3.1.2) / Merlin / Ninja.
>
> My commands file consists of:
>
> # '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$
> }
>
> # '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$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
> }
>
> I would imagine this would need to be changed/updated etc. Anyone have a how-to ?
>
> Thanks.
> _______________________________________________
> op5-users mailing list
> op5-users at lists.op5.com
> http://lists.op5.com/mailman/listinfo/op5-users
More information about the op5-users
mailing list