Email Notifications

Michael Gargiullo mgargiullo at pivotpointsecurity.com
Wed Nov 12 17:43:30 CET 2008



-----Original Message-----
From: Andreas Ericsson [mailto:ae at op5.se] 
Sent: Wednesday, November 12, 2008 9:06 AM
To: kellyjackie at eircom.net
Cc: nagios-user Mailinglist
Subject: Re: [Nagios-users] Email Notifications

kellyjackie at eircom.net wrote:
> Please help!
> I have set up eSMTP as relay.The test from the command line is as
follows: echo "test" | /usr/bin/esmtp -C ~/esmtp outside at email -f
inside at email
> outside at email is an outside email address i am sending to from an
inside email address on our email server. Do i need to specify the
inside email server and the account i am using within nagios and if so
where? or should the usual configuration be enough. the relevant parts
of the config fiels are as follows.
> 
> Thanks in advance for any help
> 
> The following are the config files:
> 
> 
> 
>>From the windows.cfg file:
> 
> define host{
>         use             windows-pcs     ; Inherit default values from
a template
>         host_name       invoicepc       ; The name we're giving to
this host
>         alias           invoicingpc     ; A longer name associated
with the host
>         address         x.x.x.x     ; IP address of the host
>         }
> 
> 
> define hostgroup{
>         hostgroup_name  windows-pcs     ; The name of the hostgroup
>         alias           Windows PCs     ; Long name of the group
>         members         invoicepc
>         }
> 
> 
> define service{
>         use                     generic-service
>         hostgroup_name          windows-pcs
>         service_description     Uptime
>         check_command           check_nt!UPTIME
>         contact_groups          admins
>         }
> 
> 
>>From the commands.cfg file:
> 
> # 'notify-host-by-email' command definition
> define command{
>         command_name    notify-host-by-email
>         command_line    /usr/bin/esmtp/printf "%b" "***** Nagios
*****\n\nNotification Type:  $NOTIFICATIONTYPE$\nHost:
$HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/esmtp -s "**
$NOTIFICATIONTYPE$ Host Host Alert: $HOSTNAME$ is $HOSTSTATE$ **"
$CONTACTEMAIL$
> 

I thought esmtp was an MTA sendmail replacement, not a mail program
replacement?

Either way, you have /usr/bin/esmtp as both a directory and an
executable in the same command.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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