please help me

Marc Powell marc at ena.com
Wed Sep 7 18:45:45 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Chandresh Suthar
> Sent: Wednesday, September 07, 2005 11:22 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] please help me
> 
> Hi,
> 
> Please help me in sending notifications. I have only one configuration
> file for contactfgroup,hostsgroup etc.  "minimal.cfg"
> 

[good stuff removed]

> 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$
>                 }
> 
> 

Have you tried executing this exactly as defined above (with
substitutions of course) as the nagios user?

[good stuff removed]

> 
> 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"
>         }

Quotes aren't necessary but I don't expect they'd be a problem.
 
[good stuff removed]

> 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
>         }

You do not appear to have any notification_options for this service.
Without it nagios will not notify for this service. This is most likely
your problem based on the information provided.
 
> 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
> <mailto:nagios at localhost> ( I tried). I am even not getting any error
> messages in logs of nagios.

Do you see a notification attempt in nagios.log? maillog?

--
Marc


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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