On Thu, Sep 24, 2009 at 12:19 PM, Marc Powell <m...@ena.com> wrote: > 2009/9/19 alexus <ale...@gmail.com>: >> why this won't work? >> i dont get notifications >> >> >> define service { >> hostgroup_name nrpe-disk >> service_description disk >> use alarm,check >> check_command check_nrpe1!check_disk >> register 1 >> } >> >> define command { >> command_name check_nrpe1 >> command_line $USER1$/check_nrpe -H >> $HOSTADDRESS$ -c $ARG1$ >> } >> > > You don't have notifications configured properly. > > Seriously though, this is not enough information to provide even a > guess what you've done wrong. There are many more variables than what > you've detailed here and nothing you've provided says anything about > your notification configuration. For starters, do you have the correct > notification options for the service? For the contact? Is the > timeperiod valid for both? Is the service reaching an alertable, HARD > state? > > If you want help with this, post the following-- > > *From objects.cache* -- > > host definition
define host { host_name jothost.j alias alexusbiz corp. (jothost) address 64.52.58.58 parents jothost.j.gw check_period 247 contact_groups staff notification_period 247 initial_state o check_interval 5.000000 retry_interval 1.000000 max_check_attempts 3 active_checks_enabled 1 passive_checks_enabled 1 obsess_over_host 1 event_handler_enabled 1 low_flap_threshold 0.000000 high_flap_threshold 0.000000 flap_detection_enabled 1 flap_detection_options o,d,u freshness_threshold 0 check_freshness 0 notification_options d,u,r,f,s notifications_enabled 1 notification_interval 0.000000 first_notification_delay 0.000000 stalking_options n process_perf_data 1 failure_prediction_enabled 1 retain_status_information 1 retain_nonstatus_information 1 } > service definition define service { host_name jothost.j service_description dummy check_period 247 check_command check_dummy!2 contact_groups staff notification_period 247 initial_state o check_interval 2.000000 retry_interval 1.000000 max_check_attempts 3 is_volatile 0 parallelize_check 1 active_checks_enabled 1 passive_checks_enabled 1 obsess_over_service 1 event_handler_enabled 1 low_flap_threshold 0.000000 high_flap_threshold 0.000000 flap_detection_enabled 1 flap_detection_options o,w,u,c freshness_threshold 0 check_freshness 0 notification_options u,w,c,r,f,s notifications_enabled 1 notification_interval 0.000000 first_notification_delay 0.000000 stalking_options n process_perf_data 1 failure_prediction_enabled 1 retain_status_information 1 retain_nonstatus_information 1 } > contactgroup definition define contactgroup { contactgroup_name staff alias alexusbiz corp. members dmitry chorine } > contact definition define contact { contact_name dmitry chorine alias sprint service_notification_period 247 host_notification_period 247 service_notification_options w,u,c,r,f,s host_notification_options d,u,r,f,s service_notification_commands notify-service-by-email,notify-service-by-pager host_notification_commands notify-host-by-email,notify-host-by-pager email xxx...@xxxxxx.xxx pager xxxxxxx...@messaging.sprintpcs.com host_notifications_enabled 1 service_notifications_enabled 1 can_submit_commands 1 retain_status_information 1 retain_nonstatus_information 1 } > the service notification command{} definition for the contact define command { command_name notify-service-by-email command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAddit ional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ } define command { command_name notify-service-by-pager command_line /usr/bin/printf "%b" "Notification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail $CO NTACTPAGER$ } > all referenced timeperiod definitions define timeperiod { timeperiod_name 247 alias 24 hour(s) a day 7 day(s) a week sunday 00:00-24:00 monday 00:00-24:00 tuesday 00:00-24:00 wednesday 00:00-24:00 thursday 00:00-24:00 friday 00:00-24:00 saturday 00:00-24:00 } > From nagios.log -- > > all entries related to this host or service around the time you expect > a notification to be sent. -bash-3.2# grep dummy nagios.log [1253764800] CURRENT SERVICE STATE: jothost.j;dummy;CRITICAL;HARD;3;CRITICAL [1253807636] SERVICE ALERT: jothost.j;dummy;CRITICAL;SOFT;1;CRITICAL [1253807696] SERVICE ALERT: jothost.j;dummy;CRITICAL;SOFT;2;CRITICAL [1253807756] SERVICE ALERT: jothost.j;dummy;CRITICAL;HARD;3;CRITICAL -bash-3.2# > From maillog -- nothing in there... > any entries related to messages for the contact nothing for this service > Also, verify in the web interface that notifications are enabled for > the host and service and that it is not in a period of scheduled > downtime. > > -- > Marc > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Nagios-users mailing list > Nagios-users@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 > -- http://alexus.org/ ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Nagios-users mailing list Nagios-users@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