Not getting any warning mail from nagios
Posted: Sun Apr 12, 2015 10:59 pm
Hi all,
I have started noticing that I am not getting any warning mail from my nagios server. If I send out using the 'Send custom service notification', I can see the mail. So I think there is some configuration issue that is causing this. Can someone please check my configurations below and advise if any changes are required. Also, How can I check when this warning status started logging in ? I have checked /var/log/nagios3/nagios.log but couldn't find any entry related with this.
I have started noticing that I am not getting any warning mail from my nagios server. If I send out using the 'Send custom service notification', I can see the mail. So I think there is some configuration issue that is causing this. Can someone please check my configurations below and advise if any changes are required. Also, How can I check when this warning status started logging in ? I have checked /var/log/nagios3/nagios.log but couldn't find any entry related with this.
Code: Select all
/etc/nagios3/servers/Testmachine1.cfg
define service{
use generic-service_gg ; Name of service template to use
host_name Testmachine1
service_description Disk Space
check_command check_nrpe_1arg!check_hda1
# check_command check_all_disks!20%!10%
}
/etc/nagios3/conf.d/g_generic_service.cfg
# generic service template definition
define service{
name generic-service_gg ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
notification_interval 60 ; Only send notifications on status change by default.
is_volatile 0
check_period 24x7
normal_check_interval 5
retry_check_interval 1
max_check_attempts 4
notification_period 24x7
notification_options w,u,c,r,f
contact_groups gmail_group
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
vi /etc/nagios3/conf.d/g_contacts.cfg
define contactgroup{
contactgroup_name gmail_group
alias My custom Group
members nagiosuser1,contactg
}
define contact{
contact_name contactg
alias Root
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f
host_notification_options d,r,f
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email [email protected]
}
define contact{
contact_name nagiosuser1
alias Root
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f
host_notification_options d,r,f
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email [email protected]
}