Alert Emails Don't Contain the Content of the Alert

John Davis linux0642 at gmail.com
Mon Aug 3 22:13:21 CEST 2009


I'm using the NSClient++ instead of NRPE, and it works as expected. The
NXClient is supplying the information correctly for all other service
alerts, and everything comes through as expected in the instant message.
The issue I'm having is that it's not being passed to the email the same
as the IM. I suppose I can just write my own handler from existing Perl
script that handles the jabber IM.

-John



Sharada wrote:
> You will need the NRPE plugin to do this.
> The config you are looking for will be in nrep.cfg on the host
> 
> On the server you need :
> 
>       define service{
>         use                     generic-service
>         host_name               remoteserver
>         service_description     /dev/sda1 Free
>         check_command check_nrpe!check_sda1
>         }
> 
> define command{
>          command_name    check_disk_c1
> 
>          command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c 
> check_disk_c1
>          
> 
> on the host :
> 
> command[check_disk_c1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 
> 
> -p /raid/c1
> 
> 
> 
> On Mon, Aug 3, 2009 at 2:54 PM, John Davis <linux0642 at gmail.com
> <mailto:linux0642 at gmail.com>> wrote:
> 
> 
>     I set up Nagios 3.0.4 using the quickstart. The service alert
>     notifications for Disk Capacity contain information regarding Ping and
>     not the Disk capacity information I expected. Here's a sample of the
>     email:
> 
> 
>     begin
>      Notification Type: PROBLEM
>      Host: jdavisxp
>      State: UP
>      Address: 10.1.41.14
>      Info: PING OK - Packet loss = 0%, RTA = 0.59 ms
> 
>     Date/Time: Mon Aug 3 08:43:34 PDT 2009
>     end
> 
>     But the message sent via Jabber worked as expected:
> 
>     begin
>     Drive Space is CRITICAL\r\nAdditional Info: c:\ - total: 148.93 Gb -
>     used: 39.76 Gb (27%) - free 109.18 Gb (73%)
>     end
> 
> 
> 
> 
>     Here's my notify service definition:
> 
>     # 'notify-service-by-email' command definition
>     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\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s
>     "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is
>     $SERVICESTATE$ **" $CONTACTEMAIL$
>     }
> 
>     Can anyone tell me why a disk capacity issue is generating a problem
>     alert that just contains info about packet loss? Obviously I've crossed
>     a config somewhere but I can't seem to find it.
> 
>     TIA!
> 
>     ------------------------------------------------------------------------------
>     Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>     30-Day
>     trial. Simplify your report design, integration and deployment - and
>     focus on
>     what you do best, core application coding. Discover what's new with
>     Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>     _______________________________________________
>     Nagios-users mailing list
>     Nagios-users at lists.sourceforge.net
>     <mailto: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
> 
> 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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