Two things I'd like you to think about when next posting to a public mailing list: 1. Don't remove the mailing-list from the list of recipients. Doing so means the mailing list archives will not contain the answer to your problem, and those of us who answer it on the list will be forced to answer it over and over and over again. 2. Don't top-post. It makes it excessively hard to understand what you're replying to, and it makes those list archives pretty much useless since people can't read the questions before the answers.
[EMAIL PROTECTED] wrote: > Thanks for the response Andreas, Actually i don't know what i'm > doing. I'm on work experience and this is my first big task. I have > nagios set up, monitoring some machines and services. Now im trying > to set up the email notifications.I cant find any documentation on > how to configure nagios with eSMTP. As the command line includes > /usr/bin/esmtp i changed the lines in notify-hosts-by-email from > usr/bin/printf to usr/bin/esmtp/printf and usr/bin/mail to > usr/bin/esmtp/mail I noticed. That's a really wild shot in the dark. I take it you're not overly familiar with unix systems? If you're not, and noone else in your organization can help you, I'd really recommend getting professional help setting up your Nagios system. Altinity is UK-based and do Nagios-related consultancy work. They can probably help you get up and running in a very short time. op5 is Sweden-based (and I work there, so shameless plug here we go), but can do installations remotely with a little help from an on-site technician. We'll also do on-site, ofcourse, but travelling costs are sometimes prohibitive. http://www.nagios.org/support/servicepartners/ has a (much) more comprehensive list. >. For each host and service do i need to include > lines to enable notifications. No, you can do that using templates. Reading the nagios documentation before you get cracking would be well spent time. > The main nagios.cfg is set to enable > notifications and the contact person also. > ----- "Andreas Ericsson" > <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] 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 [EMAIL PROTECTED] -f >> [EMAIL PROTECTED] >>> [EMAIL PROTECTED] 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/mail >> -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 [EMAIL PROTECTED] OP5 >> AB www.op5.se Tel: +46 8-230225 >> Fax: +46 8-230231 > -- Andreas Ericsson [EMAIL PROTECTED] 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@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