Notification commands

Arno Lehmann al at its-lehmann.de
Tue Sep 5 21:19:08 CEST 2006


Hi,

On 9/5/2006 3:25 PM, Hari Sekhon wrote:
>   Christopher Odenbach wrote:
> 
>>Hi,
>>
>>  
>>
>>>certainly not.
>>>
>>>just put both in the same contact definition, see
>>>http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#contact and
>>>see the Directive Description for host-notification-commands which
>>>says "...Multiple notification commands should be separated by
>>>commas...". Just make sure you have both notification commands
>>>defined in misccommand.cfg since this uses the short command names
>>>which should be defined there.
>>>    
>>>
>>But in exact this paragraph it says: Multiple notification commands 
>>should be separated by commas. All notification commands are executed 
>>when the contact needs to be notified.
>>
>>So when I put this contact into a service, always both commands will be 
>>executed. But I want some services only to send email and not SMS.
>>
>>Got my idea?

Yes... what I do:

I don't use the supplied example commands but rather created my own
notification system. The notification command, when invoked, calls the
way how to notify the contact from an LDAP backend. It's been lots of
work (and is not yet finished or even documented) but it allows more
flexibility.

The simple solution would be shell script which, by checking the
parameters for contact name, service name and whatever you like
determines how to notify. A database backend is useful for easier
configuration but not extacly necessary.

Arno

>>Christopher
>>
>>  
>>
> ah, sorry, in my haste I misread, ok then you do need 2 contact 
> definitions and 2 contactgroup definitions, one email, and one both, 
> then just assign the contact group to the service definitions according 
> to which notifications you want.
> 
> If anybody else has a better way of doing this I'd like to hear it...
> 
> 
> Hari
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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

-- 
IT-Service Lehmann                    al at its-lehmann.de
Arno Lehmann                  http://www.its-lehmann.de


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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