How to change Switch notification options

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
lafargeuser
Posts: 341
Joined: Thu Sep 27, 2012 12:23 am

How to change Switch notification options

Post by lafargeuser »

Monitoring switch using nagioscore. Able to receive Email notification, But further to this, I would like to change
from notification_options d,r to notification_options c,u

c=critical
u=up

The reason for I have integrated Nagios core to service desk tool for autoticketing & service desk tool is configured such way that if any Email notification receive for Critical,ticket will be created, in above case receiving Email notificaton with Down message , I would need to change this. How should I do that.
I tried changing in tempate.cfg but didnt work. below is sample file pasted.



# Define a template for switches that we can reuse
define host{
name generic-switch ; The name of this host template
use generic-host ; Inherit default values from the generic-host template
check_period 24x7 ; By default, switches are monitored round the clock
check_interval 5 ; Switches are checked every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each switch 10 times (max)
check_command check-host-alive ; Default command to check if routers are "alive"
notification_period 24x7 ; Send notifications at any time
notification_interval 30 ; Resend notifications every 30 minutes
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
}
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: How to change Switch notification options

Post by slansing »

Take a look at the following documentation:

http://nagios.sourceforge.net/docs/3_0/ ... tions.html

Hosts and services have state flags specific to them, for instance a host can not be in a critical or warning state, only a service can. In that respect hosts can only be up or down, not Ok or Critical like a service. Hope that makes sense.
Locked