multiple contact notifications for one host

ryanp at hhsys.org ryanp at hhsys.org
Tue Feb 14 18:26:43 CET 2006


That worked for PING (an active check) but its not working for passive
checks, which all the hosts I have monitored are configured by.

I have a DISK for all-hosts but I made a second definition in services.cfg
called DISK_WEB but since the info is a passive check its not working.


./check_disk sends the text DISK at the beginning of its output so I think
nagios is parsing that as DISK in which it already has another DISK
definition that it is checking.


****
send_passive_checks file on a particular host.
****
cd /usr/nagios/libexec
# load average check
./submit_check_result_via_nsca LOAD `./check_load -w 1,1,1 -c 3,3,3`
# disk check
./submit_check_result_via_nsca `./check_disk -w20% -c10%`
./submit_check_result_via_nsca DISK_WEB `./check_disk -w20% -c10%`

./submit_check_result_via_nsca `./check_kernel`

# why do they look different? ask nagios why some commands include the
service name and others don't. Because of this, i had to add the "LOAD" to
the load avg line.


***
portion of my services.cfg
***

define service{
        use                             generic-service         ; Name of
service template to use

#       hostgroup_name                  load-disk
        hostgroup_name                 
webmail-servers,web-servers,firewalls,all-real-servers,devboxes
        service_description             DISK
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        active_checks_enabled           0
        passive_checks_enabled          1
        contact_groups                  linux-admins
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r
        check_freshness                 1
        freshness_threshold             600
        check_command                   check_disk
}


define service{
        use                             generic-service
        hostgroup_name                  webteam
        service_description             DISK_WEB
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              3
        normal_check_interval           5
        retry_check_interval            1
        active_checks_enabled           0
        passive_checks_enabled          1
        contact_groups                  webteam
        notification_interval           120
        notification_period             24x7
        notification_options            w,u,c,r
        check_freshness                 1
        freshness_threshold             600
        check_command                   check_disk
}


For the particular host I tried to setup up a passive check for DISK_WEB
nagios just says the status UNKNOWN.

Warning threshold must be integer or percentage!








Johan Corsini said:
> If I understand well, you want your check_disk on HostA to be send to the
> 2
> mailing lists, while all the other check_disk being only send to one of
> the
> mailing list?
>
> If I am true, then you could create a new service, "check_disk_A", doing
> exactly the same things than the regular check_disk, but with other
> notification options.
>
> Sorry if I did not understand well the question.
>
> Johan
>
>
>
> Le Mardi 14 Février 2006 17:18, ryanp at hhsys.org a écrit :
>> This is what I want to accomplish:
>>
>>
>> One host's disk space to be monitored, named      HostA
>>
>>
>>
>> Have HostA in two different hostgroups    GroupA and GroupB
>>
>>
>> GroupA contact group is defined with email1
>> GroupB contact group is defined with email2
>>
>>
>> GroupA has a bunch of other hosts that email2 shouldnt receive so thats
>> why I'm trying to put it into a different group.
>>
>>
>> **All the hosts are on passive checking.**
>> So when the disk space gets to a WARNING OR CRITICAL for nagios to email
>> GroupA and GroupB.  But it looks like in the services.cfg is where you
>> actually setup the notification functionality.  Since checking disk is
>> needed on all hosts, it looks like I cant separate the notifications for
>> 2
>> separate emails that are both responsibilty for only one box and not
>> all.
>>
>>
>> I would imagine there is a way to do what I'm attempting but I'm going
>> in
>> the wrong direction.  I need some other clear minds to point in me in
>> the
>> right direction. Thanks.! ;-)
>>
>> -------------------------------------------------------------
>>
>> Note: This email is for the sole use of the intended
>> recipient(s) and may contain confidential information.  Any
>> unauthorized review, use, disclosure or distribution is
>> prohibited.  Contact the sender if received in error.
>>
>>
>> -------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
>> files for problems?  Stop!  Download the new AJAX search engine that
>> makes
>> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&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
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
> _______________________________________________
> 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
>




-------------------------------------------------------------

Note: This email is for the sole use of the intended
recipient(s) and may contain confidential information.  Any
unauthorized review, use, disclosure or distribution is
prohibited.  Contact the sender if received in error.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&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