Page 3 of 3

Re: Server reboot notification.

Posted: Thu Feb 27, 2014 4:52 pm
by WillemDH
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?
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.

Re: Server reboot notification.

Posted: Fri Feb 28, 2014 11:16 am
by lmiltchev
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.

Re: Server reboot notification.

Posted: Wed Apr 02, 2014 6:44 pm
by pacmag
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.
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:
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.

Posted: Wed Apr 02, 2014 7:16 pm
by pacmag
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
}

Re: Server reboot notification.

Posted: Thu Apr 03, 2014 12:58 pm
by sreinhardt
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.