Nagios not sending notification for my services. I have two service called PING and STATUS in nagios localhost.
PING service check host availability using ping command and STATUS service get the SNMP traps from remote machine.
Sometimes i getting email for PING service but STATUS service not getting any mail. PING service also not sending mail always. Below all of my configuration files.
localhost.cfg
define host{
use linux-server
host_name TESTHOST
alias snmp_agent
address 10.10.62.5
}
define service{
use local-service
host_name TESTHOST
service_description PING
check_command mailtest
notifications_enabled 1
}
define service{
host_name TESTHOST
service_description STATUS
is_volatile 1
check_freshness 1
check_command cagent!5
max_check_attempts 4
normal_check_interval 1
retry_check_interval 1
active_checks_enabled 0
passive_checks_enabled 1
check_period 24x7
notification_interval 20
notification_period 24x7
notification_options w,u,c
notifications_enabled 1
flap_detection_enabled 0
}
contacts.cfg
define contact{
contact_name nagiosadmin
use generic-contact
alias Nagios Admin
email [email protected]
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
I using ssmtp mail server to send mail. configuration file below
ssmtp.conf
[email protected]
mailhub=smtp.gmail.com:587
rewriteDomain=gmail.com
hostname=sujin
UseTLS=YES
UseSTARTTLS=YES
AuthMethod=LOGIN
[email protected]
AuthPass=mailpassword
FromLineOverride=YES