Different contact commands for different state s?

Tedman Eng teng at dataway.com
Mon Sep 20 22:37:50 CEST 2004


You might be able to achieve this using && and || command chains.

[ "$NOTIFICATIONTYPE$" == "ACKNOWLEDGEMENT" ] && printf|mail phb at domain ||
printf|mail admin at domain

"[" should be either a symlink to test or shell builtin, probably depends on
your platform.


-----Original Message-----
From: jeff vier [mailto:jeff.vier at tradingtechnologies.com]
Sent: Monday, September 20, 2004 1:05 PM
To: nagios-users
Subject: [Nagios-users] Different contact commands for different states?


Can I do either differing contact definitions (one for Recovery, one for
problems) or some kind of if-statement in the misccommands?
(I know, wishful thinking with the latter).

I'm running v2.0a, if that matters.

In case you're curious as to why I want such a thing, I'm sending an
Acknowledgment link with my alerts, but another thread (Andreas talking
about patching in similar functionality) got me thinking - how can I not
send the Ack link on Recovery (since it doesn't really do anything)?



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
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


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
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