[SOLVED] - Host notifications not always sent
Posted: Wed May 21, 2014 12:12 pm
Hi,
I have installed nagios v4.0.2, and I'm having problems on some hosts, whose notifications are not always sent.
This is an excerpt from the log, where you can see the entries related to a particular host:
As you can see, a notification can be found when the host went down (I've indented it), but there aren't any notifications when it went up again.
I'm experiencing this issue with some of the configured servers. However, other servers, sharing the same configurations, produce correct notifications.
The configuration for the host is as follows:
And the notifications configuration is as follows:
The host definition template is:
The contact group is defined as:
The command is defined as follows:
What I've found is that usually there are no notifications when the host is up again (but as I said before, this not applies to all the hosts, although all of them share the same configuration).
Any suggestions?
Thanks in advance.
I have installed nagios v4.0.2, and I'm having problems on some hosts, whose notifications are not always sent.
This is an excerpt from the log, where you can see the entries related to a particular host:
Code: Select all
May 21 15:53:03 eureka nagios: HOST ALERT: srvext56;DOWN;SOFT;1;CRITICAL - Socket timeout after 10 seconds
May 21 15:53:28 eureka nagios: HOST ALERT: srvext56;UP;SOFT;2;HTTP WARNING: HTTP/1.0 400 Bad Request - 1622 bytes in 0.191 second response time
May 21 16:55:43 eureka nagios: HOST ALERT: srvext56;DOWN;SOFT;1;CRITICAL - Socket timeout after 10 seconds
May 21 16:56:07 eureka nagios: HOST ALERT: srvext56;DOWN;SOFT;2;CRITICAL - Socket timeout after 10 seconds
May 21 16:57:17 eureka nagios: HOST ALERT: srvext56;DOWN;SOFT;3;CRITICAL - Socket timeout after 10 seconds
May 21 16:58:27 eureka nagios: HOST ALERT: srvext56;DOWN;SOFT;4;CRITICAL - Socket timeout after 10 seconds
May 21 16:59:37 eureka nagios: HOST ALERT: srvext56;DOWN;HARD;5;CRITICAL - Socket timeout after 10 seconds
May 21 16:59:37 eureka nagios: HOST NOTIFICATION: nagios-admin;srvext56;DOWN;host-notify-by-email;CRITICAL - Socket timeout after 10 seconds
May 21 17:35:38 eureka nagios: HOST ALERT: srvext56;UP;HARD;1;HTTP WARNING: HTTP/1.0 400 Bad Request - 1622 bytes in 0.190 second response time
May 21 17:37:48 eureka nagios: HOST ALERT: srvext56;DOWN;SOFT;1;CRITICAL - Socket timeout after 10 seconds
May 21 17:38:35 eureka nagios: HOST ALERT: srvext56;DOWN;SOFT;2;CRITICAL - Socket timeout after 10 seconds
May 21 17:39:45 eureka nagios: HOST ALERT: srvext56;DOWN;SOFT;3;CRITICAL - Socket timeout after 10 seconds
May 21 17:40:31 eureka nagios: HOST ALERT: srvext56;DOWN;SOFT;4;CRITICAL - Socket timeout after 10 seconds
May 21 17:41:41 eureka nagios: HOST ALERT: srvext56;DOWN;HARD;5;CRITICAL - Socket timeout after 10 seconds
May 21 17:55:38 eureka nagios: HOST ALERT: srvext56;UP;HARD;1;HTTP WARNING: HTTP/1.0 400 Bad Request - 1622 bytes in 0.654 second response timeI'm experiencing this issue with some of the configured servers. However, other servers, sharing the same configurations, produce correct notifications.
The configuration for the host is as follows:
Code: Select all
define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name srvext56
alias srvext56
address XX.XX.XX.XX
}
Code: Select all
define contact{
contact_name nagios-admin
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,c,r
host_notification_options d,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email email_address
}Code: Select all
define host{
name linux-server ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
check_period 24x7 ; By default, Linux hosts are checked round the clock
max_check_attempts 5 ; Check each Linux host 10 times (max)
check_interval 2
check_command check-host-alive-by-http ; Default command to check Linux hosts
notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 0 ; Resend notification every 2 hours
notification_options d,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}Code: Select all
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members nagios-admin
}Code: Select all
define command {
command_name check-host-alive-by-http
command_line $USER1$/check_http -H $HOSTADDRESS
}Any suggestions?
Thanks in advance.