Because you have a contact defined at host level, not a contactgroup. Try configuring a dummy contactgroup to the service and you will see the contactgroups from the host are not inherited.That's my point, if I have defined the contactname for the service explicitly why is it still spamming to the host contact group??, If it is inherited from the host, what's the point of creating service specific contacts?
Server reboot notification.
Re: Server reboot notification.
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: Server reboot notification.
WillemDH is correct. Open the "/usr/local/nagios/var/objects.cache" file in a text editor, find the "Uptime" service, and see what is the contact group that is used. Add the "dummy" contactgroup to the service, open the "/usr/local/nagios/var/objects.cache", and check again. Now, the "dummy" contactgroup should be used, instead of the one, inherited from the host.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Server reboot notification.
Yes the actual config in the /usr/local/nagios/var/objects.cache is different than the one I can see from web interface. See below:lmiltchev wrote:WillemDH is correct. Open the "/usr/local/nagios/var/objects.cache" file in a text editor, find the "Uptime" service, and see what is the contact group that is used. Add the "dummy" contactgroup to the service, open the "/usr/local/nagios/var/objects.cache", and check again. Now, the "dummy" contactgroup should be used, instead of the one, inherited from the host.
I don't have any contact defined for this service from nagios console but I do have the contact group dlitserverteam defined there but in this file it shows the contact as dlitserverteam and contact groups ServerTeam which looks like inherited from the host. How do I fix this issue.
All I want is receive notification in dlitserverteam group not the ServerTeam group.
define service {
host_name atp-elvprocess3.<OUR DOMAIN>
service_description Uptime
display_name SNMP Uptime
check_period xi_timeperiod_24x7
check_command check_snmp_uptime!!!!!!!!
contacts dlitserverteam
contact_groups ServerTeam
notification_period xi_timeperiod_24x7
initial_state o
check_interval 1.000000
retry_interval 1.000000
max_check_attempts 1
is_volatile 0
parallelize_check 1
active_checks_enabled 1
passive_checks_enabled 1
obsess_over_service 1
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 1
flap_detection_options o,w,u,c
freshness_threshold 0
check_freshness 0
notification_options u,w,c,r,f,s
notifications_enabled 1
notification_interval 60.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
failure_prediction_enabled 1
retain_status_information 1
retain_nonstatus_information 1
_XIWIZARD linuxsnmp
}
Let me know what I need to change to fix this issue.
Re: Server reboot notification.
Also for some reason; upon the verification of config files its giving the warning message to all servers with the below :
Warning: Duplicate definition found for service 'Uptime' on host 'ato-elvprocess3.<OUR DOMAIN>' (config file '/usr/local/nagios/etc/services/atp-elvprocess3.<OUR DOMAIN>.cfg', starting on line 45)
And on the line 45 the service
define service {
host_name atp-elvprocess3.<OUR DOMAIN>
service_description Uptime
use Check_Host_Uptime
check_command check_snmp_uptime
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
contact_groups Reboot_Notification_Group
_xiwizard windowssnmp
register 1
}
Warning: Duplicate definition found for service 'Uptime' on host 'ato-elvprocess3.<OUR DOMAIN>' (config file '/usr/local/nagios/etc/services/atp-elvprocess3.<OUR DOMAIN>.cfg', starting on line 45)
And on the line 45 the service
define service {
host_name atp-elvprocess3.<OUR DOMAIN>
service_description Uptime
use Check_Host_Uptime
check_command check_snmp_uptime
max_check_attempts 1
check_interval 1
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
contact_groups Reboot_Notification_Group
_xiwizard windowssnmp
register 1
}
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Server reboot notification.
You should look in core config manager at the services for host ato-elvprocess3.<OUR DOMAIN>. It seems that you likely have duplicate named services, although the configs show them differently. At the same time go into the Uptime service with display_name SNMP Uptime, and change the contact, so that it notifies properly.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.