Email Notifications
Andreas Ericsson
ae at op5.se
Wed Nov 12 15:06:02 CET 2008
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$
>
/usr/bin/esmtp/printf looks totally bogus. I've got a feeling
someone's used a crappy regex to modify the config here.
Besides that, I believe esmtp is an smtp *server*, so it's not
supposed to be run from the command line. I'm not sure about
that though, so I'll just assume you've read the manuals for
esmtp and know what you're doing (well, one can always hope,
right?).
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------------------------
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