Nagios repeated notifications with passive checks
Posted: Thu Dec 05, 2013 2:35 pm
I have a setup where nagios receives a snmp trap from a device. It then notifies the contact defined in config.cfg. that works great. What I am trying to accomplish is have nagios send another notification if the problem isn't acknowledge in a given amount of time. I can not get nagios to send that second notification. I am using external commands to actually make a call as the notification, that all works fine. I don't see nagios attempt to make that second notification.
I cut down all my config files to 1 config file for easy of reading.
I cut down all my config files to 1 config file for easy of reading.
Code: Select all
#TIMEPERIODS
define timeperiod{
timeperiod_name 24x7
alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}
#SERVICES
##handle the trap
define service{
host_name serverName
service_description TRAP
is_volatile 1
check_command check-host-alive
max_check_attempts 3
normal_check_interval 1
retry_check_interval 1
active_checks_enabled 0
passive_checks_enabled 1
check_period 24x7
notification_interval 1
notification_period 24x7
notification_options w,u,c
notifications_enabled 1
contact_groups admins
}
#COMMANDS
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
define command{
command_name notify-host-by-sip
command_line /usr/lib64/nagios/plugins/calls/makeCall "$NOTIFICATIONTYPE$"
}
define command{
command_name notify-service-by-sip
command_line /usr/lib64/nagios/plugins/calls/makeCall "$NOTIFICATIONTYPE$"
}
#CONTACT_GROUPS
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members user_sip
}
#CONTACTS
define contact{
contact_name user_sip
alias useralias
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w
host_notification_options d
service_notification_commands notify-service-by-sip
host_notification_commands notify-host-by-sip
email someNumber@someServer
}
#HOSTS
define host{
host_name localhost
alias Development
address serverIP
max_check_attempts 5
check_period 24x7
contact_groups admins
notification_period 24x7
}
define host{
host_name serverName
alias Development
address someIP
max_check_attempts 5
check_period 24x7
contact_groups admins
notification_period 24x7
}