obsess_over_services parametr
Posted: Thu Nov 07, 2013 1:11 pm
Hello !
I have local machine with Nagios installed.
I have HP proliant server on the other machine with nrpe and plugins installed on the same lan network.
Everything is installed and looks good including web-interface.
But I don't receive email notifications.
My questions is - shall I put obsess_over_services=1 in my nagios.conf to get notifications? now it is 0
Here my configs , I'm using mutt for testing purpose
commands.cfg
my host and services conf.
I have local machine with Nagios installed.
I have HP proliant server on the other machine with nrpe and plugins installed on the same lan network.
Everything is installed and looks good including web-interface.
But I don't receive email notifications.
My questions is - shall I put obsess_over_services=1 in my nagios.conf to get notifications? now it is 0
Here my configs , I'm using mutt for testing purpose
commands.cfg
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mutt -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line echo " TEST" | /usr/bin/mutt -s "TEST" [email protected]
}
my host and services conf.
my contact.confdefine host {
use generic-host
name linux-box
notifications_enabled 1
event_handler_enabled 1
failure_prediction_enabled 1
process_perf_data 1
notification_options d,u,r,s
check_period 24x7
check_interval 2
retry_interval 1
max_check_attempts 5
notification_interval 1
notification_period 24x7
contacts nagiosadmin
contact_groups admins
register 0
}
define host {
use linux-box
host_name hp
alias hp proliant
address 192.168.1.70
}
define service{
use generic-service
host_name hp
service_description Current users logged in
check_command check_nrpe_users
check_interval 1
check_period 24x7
retry_interval 2
max_check_attempts 3
notification_interval 4
notification_period 24x7
notification_options c,w,u,r
contacts nagiosadmin
contact_groups admins
notifications_enabled 1
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members root, nagiosadmin
}
############### I added this contact##############################################################
define contact{
contact_name nagiosadmin
alias Admin
host_notifications_enabled 1
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
host_notification_commands notify-host-by-email
service_notifications_enabled 1
service_notification_period 24x7
service_notification_commands notify-service-by-email
service_notification_options w,u,c,r
email [email protected]
}