Page 2 of 13
Re: contacts.cfg is not working properly
Posted: Mon Oct 05, 2015 1:19 pm
by sinkak
yes in same file contacts_nagios2.cfg
Re: contacts.cfg is not working properly
Posted: Mon Oct 05, 2015 1:22 pm
by hsmith
Is the file properly defined in nagios.cfg?
Code: Select all
grep contacts_nagios2.cfg /usr/local/nagios/etc/nagios.cfg
Re: contacts.cfg is not working properly
Posted: Mon Oct 05, 2015 1:45 pm
by sinkak
i didnt specify each file in nagios.cfg.
i put all the servers config in a folder and specified that folder.
For example
Code: Select all
# Debian uses by default a configuration directory where nagios3-common,
# other packages and the local admin can dump or link configuration
# files into.
cfg_dir=/usr/local/nagios/etc/conf.d
conf.d folder has all the server config files in separate folders and also contacts folder.
ubuntu@nagios-2015:/usr/local/nagios/etc/conf.d$ ls
admin-resourses dc-servers generic-host_nagios2.cfg
ips rds service_groups.cfg timeperiods_nagios2.cfg
webservers-stage
cacheservers elb generic-service_nagios2.cfg localhost_nagios2.cfg riak services.cfg
weblinux-servers
contacts extinfo_nagios2.cfg hostgroups_nagios2.cfg pnp4nagios.cfg
schedulers services_nagios2.cfg
webservers
ubuntu@nagios-2015:/usr/local/nagios/etc/conf.d$
Re: contacts.cfg is not working properly
Posted: Mon Oct 05, 2015 1:56 pm
by hsmith
All right, just wanted to eliminate that one from the pool. What version of core are you using? I believe in older versions you had to specify
Code: Select all
host_notifications_enabled 1
service_notifications_enabled 1
in the contact definition.
https://assets.nagios.com/downloads/nag ... ml#contact
Re: contacts.cfg is not working properly
Posted: Mon Oct 05, 2015 1:58 pm
by sinkak
Nagios® Core⢠4.0.8
Re: contacts.cfg is not working properly
Posted: Mon Oct 05, 2015 5:01 pm
by hsmith
Could you post one of the service definitions that is failing to send out an alert?
Re: contacts.cfg is not working properly
Posted: Tue Oct 06, 2015 9:54 am
by sinkak
Free disks space, Check_HTTP critical checks.
They are showing up as critical in
[email protected].
But not in
[email protected]
Re: contacts.cfg is not working properly
Posted: Tue Oct 06, 2015 11:23 am
by hsmith
Can you post the actual service definition from the configuration file?
Such as:
Code: Select all
define service{
host_name linux-server
service_description check-disk-sda1
check_command check-disk!/dev/sda1
max_check_attempts 5
check_interval 5
retry_interval 3
check_period 24x7
notification_interval 30
notification_period 24x7
notification_options w,c,r
contact_groups linux-admins
}
Re: contacts.cfg is not working properly
Posted: Tue Oct 06, 2015 11:32 am
by sinkak
Code: Select all
define service{
use generic-service,srv-pnp
hostgroup_name weblinux-servers
service_description Free disks space
contact_groups admins
check_command check_nrpe_args!check_all_disks!20%!10%
_graphiteprefix ua-east-1a.weblinux
_graphitepostfix disk
}
Re: contacts.cfg is not working properly
Posted: Tue Oct 06, 2015 1:45 pm
by hsmith
What is the output of a grep -Pzo "(?s)^define\s*?(contact|contactgroup)\s*.*?}" /usr/local/nagios/var/objects.cache command?