Incorrect Nagios "Host UP" alerts
Posted: Wed Oct 12, 2016 10:30 pm
Hi All,
good day!
Im new to this forum.I have a question/issue which has been troubling lately.Nagiso is sending incorrect HOST UP alerts but the hosts are never DOWN.I have configured my nagios as below.Please help.
contacts.cfg -
commands.cfg:
hosts.cfg:
good day!
Im new to this forum.I have a question/issue which has been troubling lately.Nagiso is sending incorrect HOST UP alerts but the hosts are never DOWN.I have configured my nagios as below.Please help.
contacts.cfg -
Code: Select all
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
Code: Select all
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOS
TADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /product/sendEmail-v1.56/sendEmail -f nagios@****** -s ******:25 -
u "***** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ *****" -t $CONTACTEMAIL$
}
Code: Select all
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddres
s: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /product/sendEmail-v1.56/sendEmail -f nagios@****** -s ******:25 -u "***** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ *****" -t $CONTACTEMAIL$
}
Code: Select all
# 'check_ping' command definition
define command{
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 300000.0,100% -c 300000.0,100%
}
Code: Select all
define host{
use linux-server
host_name HOST1
alias HOST1
address ******
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check_ping
notification_period 24x7
notification_interval 30
contact_groups admins
}