No email alerts ??

Nedim Bicic nedo72 at gmail.com
Thu Oct 4 02:32:40 CEST 2007


Hey sounds good but what exctly am i exucuting at the commadn line

is this the line i am executing: i replaced $CONTACTEMAIL$ with my email
address but says cant find directory i tried executing from root:
su nagios s /bin/sh but says cant find directory ?? help please

*/bin/mail -s  "Host $HOSTSTATE$ alert for $HOSTNAME$!" $nedo72 at gmail.com$*




On 10/3/07, Hugo van der Kooij <hvdkooij at vanderkooij.org> wrote:
>
> On Wed, 3 Oct 2007, Nedim Bicic wrote:
>
> > Hey all have nagios 2.9 running linux red hat enterprise 4 the email for
> > nagios sending notifications arent working for some reason i know the
> box
> > can send email because the it has the MTA agent installed cuase i can
> send
> > other emials from that machine
> >
> > I can see host down in nagios webpage i have the contact groups set
> > appropritaley and of course my email address in contacts group i even
> did a
> > sanity check to see if i have any syntex errors nothing so far.
> >
> > this is what i have in commands.cfg file under emails:
> >
> > # 'host-notify-by-email' command definition
> > define command{
> > command_name host-notify-by-email
> > command_line /usr/bin/printf "%b" "***** Nagios 2.9*****\n\nNotification
> > Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
> > $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" |
> > /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
> > }
> >
> > and i also took out the option not to notify in my host file.
>
> Do you have events logged by Nagios? Does it show notifications? If that
> happens to be the case then llok at the delivery of the notifications.
>
> If one assumes you run this as the nagios user then test is as such.
>
> Become the nagios user with:
>        su - nagios s /bin/sh
>
> Then execute the command as shown on the commandline but substitute
> $CONTACTEMAIL for the intended recipient.
>
> If that fails to deliver then you need to fix your MTA. Get to the logs of
> it to check it out.
>
> Hugo.
>
> --
>        hvdkooij at vanderkooij.org        http://hugo.vanderkooij.org/
>            This message is using 100% recycled electrons.
>
>        Some men see computers as they are and say "Windows"
>        I use computers with Linux and say "Why Windows?"
>        (Thanks JFK, for this quote of George Bernard Shaw.)
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071003/03b06281/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
-------------- next part --------------
_______________________________________________
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