Custom notification for each service check?

Rainer sourceforge at rainer.net
Sun Apr 27 00:19:14 CEST 2003


At 01:01 26/4/2003, Subhendu Ghosh wrote:
>On Fri, 25 Apr 2003, Rainer wrote:
>
> > Hello,
> >
> > How can I send out custom notifications for each service check? (without
> > having to create additional/duplicate contacts or services)
> >
> > Ex.: When check_local_disk_sda1 (custom checkcommand) changes to a 
> critical
> > state (on any of the configured hosts), I want to send the following
> > notification to the assigned contactgroups:
> >
> > "Warning: /dev/sda1 on server $HOSTALIAS is low on disk space"
> >
> > Thanks in advance,
> > Rainer
> >
>
>custom event handler can do that
>
>
>--
>
>-sg

Hello Subhendu,

Thanks for your tip.
But if I use event handlers to send custom notifications, there would be 
some drawbacks:

1) I would be unable to send these notifications to the Nagios contacts. I 
would have to hand-code all contacts/emails in a bash/perl script, and 
change the script everytime I add/remove contacts.

2) I would be unable to use timeperiods.

3) I would be unable to use many of the macros I currently use with 
service/host notifications (such as $CONTACT* and $NOTIFICATIONTYPE$)

This could be a suggestion for a future Nagios version... the ability to 
somehow use service_notification_commands and host_notification_commands 
with services templates.

Rainer



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list