Fwd: please help me
Jason Bodnar
jason at shakabuku.org
Sun Sep 18 21:21:20 CEST 2005
You need notification_options in your service definition. The docs says this
is a required field but nagios doesn't complain about it. That's a bug to me.
I posted about this to the list last week but it never went through.
On Mon, 19 Sep 2005 00:17:23 +0530, Chandresh Suthar wrote
> Hi,
> Still problem persist. Can anyone help me.
>
> ---------- Forwarded message ----------
> From: Chandresh Suthar <chandresh.suthar at gmail.com>
> Date: Sep 7, 2005 9:52 PM
> Subject: please help me
> To: nagios-users at lists.sourceforge.net
>
> Hi,
> Please help me in sending notifications. I have only one
> configuration file for contactfgroup,hostsgroup etc. "minimal.cfg"
> minimal.cfg : define timeperiod{ timeperiod_name 24x7 alias 24 Hours
> A Day, 7 Days 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
> }
>
> define command{
> command_name notify-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\nAdditional
> Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert -
> $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ }
>
> # This is a sample host notification command that can be used to send email
> # notifications (about host alerts) to contacts.
>
> define command{
> command_name host-notify-by-email
> command_line /usr/bin/printf "%b" "***** Nagios
> *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost:
> $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
> $OUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "Host
> $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$ }
>
> define contact{
> contact_name nagios
> alias Nagios Admin
> service_notification_period 24x7
> host_notification_period 24x7
> service_notification_options w,u,c,r
> host_notification_options d,r
> service_notification_commands notify-by-email
> host_notification_commands host-notify-by-email
> email nagios at localhost
> }
>
> define contact{
> contact_name chandresh
> alias Administrator
> service_notification_period 24x7
> host_notification_period 24x7
> service_notification_options w,u,c,r
> host_notification_options d,r
> service_notification_commands notify-by-email
> host_notification_commands host-notify-by-email
> email "personalemail id"
> }
>
> define contactgroup{
> contactgroup_name admins
> alias Nagios Administrators
> members nagios
> }
>
> define contactgroup{
> contactgroup_name admingrp
> alias Administrators
> members chandresh
> }
>
> 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 register 0 ; DONT REGISTER THIS
> DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! }
>
> define host{
> use generic-host ; Name of host template to use
> host_name webmail.com <http://webmail.com/>
> alias localhost
> address 127.0.0.1 <http://127.0.0.1/>
> check_command check-host-alive
> max_check_attempts 10
> notification_interval 120
> notification_period 24x7
> notification_options d,r
> contact_groups admingrp
> }
> define service{
> use generic-service ; Name of service template to use
> host_name webmail.com <http://webmail.com/>
> service_description HTTP
> is_volatile 0
> check_period 24x7
> max_check_attempts 4
> normal_check_interval 5
> retry_check_interval 1
> contact_groups admingrp
> notification_interval 960
> notification_period 24x7
> check_command check_http
> }
>
> I am able to send mails to my persoanl email id by "mail" command.
> But notification is not going. I have configured sendmail. I am not
> even receiving mails on local system at nagios at localhost( I tried).
> I am even not getting any error messages in logs of nagios.
>
> Please help.
--
Jason Bodnar
jason at shakabuku.org
http://www.shakabuku.org
"You want free speech? Let's see you acknowledge a man whose words make
your blood boil who is standing center stage advocating at the top of
his lungs that which you would spend a lifetime opposing at the top of
yours." -- President Andrew Shephard, "The American President"
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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