service notification
Clair Johnson
clair at practeo.ch
Fri Feb 5 17:49:30 CET 2010
Hi all,
I have simples questions.
Is it possible not to execute host checks but execute services checks ?
Is it possible to send services notifications when the host is not checked ?
Because I don't understand, I'm not notified of services changes.
here are parts of my conf files (They come from my old nagios 2.9 configuration, I'm actualy moving from 2.9 to 3.2) :
##### static definitions
## notifications commands
define command{
command_name notify-by-mail
command_line /opt/nagios/libexec/notify_manager mail $CONTACTNAME$ "$CONTACTALIAS$" $CONTACTEMAIL$ $HOSTADDRESS$ "$HOSTALIAS$" "$SERVICEDESC$" $SERVICESTATE$ "$SERVICEOUTPUT$" $DATE$ $TIME$ $LASTSERVICESTATECHANGE$
}
define command{
command_name notify-by-sms
command_line /opt/nagios/libexec/notify_manager sms $CONTACTNAME$ "$CONTACTALIAS$" $CONTACTEMAIL$ $HOSTADDRESS$ "$HOSTALIAS$" "$SERVICEDESC$" $SERVICESTATE$ "$SERVICEOUTPUT$" $DATE$ $TIME$ $LASTSERVICESTATECHANGE$
}
define command{
command_name host-notify-by-mail
command_line /opt/nagios/libexec/dummy
}
define command{
command_name host-notify-by-sms
command_line /opt/nagios/libexec/dummy
}
## contacts templates
define contact{
name generic-contact-mail
host_notification_period 24x7
host_notification_options d,r
host_notification_commands host-notify-by-mail
service_notification_options w,u,c,r
service_notification_commands notify-by-mail
register 0
}
define contact{
name generic-contact-sms
host_notification_period 24x7
host_notification_options d,r
host_notification_commands host-notify-by-sms
service_notification_options c
service_notification_commands notify-by-sms
register 0
}
## host template
define host{
name generic-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host 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
check_interval 1
max_check_attempts 2
notification_interval 120
notification_period 24x7
notification_options d,r
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
## service template
define service{
name generic-service ; 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
is_volatile 0
check_period 24x7
notification_interval 2880
notification_options w,u,c,r,f
notification_period 24x7
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
##### dynamic definitions
## contacts definition
define contact{
use generic-contact-mail
contact_name contact_4_2_mail
alias Clair Johnson
email clair at practeo.ch
service_notification_period timeperiod_4_2_mail
}
define timeperiod{
timeperiod_name timeperiod_4_2_mail
alias timeperiod_4_2_mail
monday 07:00-22:00
tuesday 07:00-22:00
wednesday 07:00-22:00
thursday 07:00-22:00
friday 07:00-22:00
sunday 07:00-22:00
saturday 07:00-22:00
}
define contact{
use generic-contact-sms
contact_name contact_4_2_sms
alias Clair Johnson
email null
service_notification_period timeperiod_4_2_sms
}
define timeperiod{
timeperiod_name timeperiod_4_2_sms
alias timeperiod_4_2_sms
}
## host definition
define host{
use generic-host
host_name localhost
alias supervision
address localhost
contact_groups contactgroup_2
}
## service definition
define service{
use generic-service
host_name localhost
service_description http
contact_groups contactgroup_2
check_command check_http!"80"
normal_check_interval 20
retry_check_interval 20
max_check_attempts 3
}
A run a complete custom interface but everything else seems working normally, except that the transition between state changes in only 1 check attempt and not what is specified in the service description.
Dose some one has any idea why I don't get notifications from services checks and why the max_check_attempts is not working normaly ?
Thx a lot for the help
Clair Johnson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100205/85746d75/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list