No email alerts ??
Nedim Bicic
nedo72 at gmail.com
Wed Oct 3 23:29:32 CEST 2007
Here are my contact.cfg file
define contact{
contact_name Nedo
alias Nedo Bicic
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-by-email
host_notification_commands host-notify-by-email
email nedo72 at gmail.com
}
this is my contactsgroup.cfg
define contactgroup{
contactgroup_name Nedo
alias Nedo Admin
members Nedo
}
adn this is for my host file i disconnect in order to get email alerts:
define host{
use generic-host ; Name of host
template to use
host_name Test1
alias Test1
address 10.8.2.40
check_command check-host-alive
max_check_attempts 10
check_period 24x7
notification_interval 120
notification_period 24x7
notification_options d,r
contact_groups Nedo
}
and these are the serivice.cfg file for the above
define service{
use generic-service ; Name of
service template to use
host_name Test1
service_description PING
is_volatile 0
check_period 24x7
max_check_attempts 4
normal_check_interval 2
retry_check_interval 1
contact_groups Nedo
notification_options w,u,c,r
notification_interval 60
notification_period 24x7
check_command check_ping!100.0,20%!500.0,60%
}
and here is my commands.cfg file just incase something i am doing wrong
# '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$
}
also i checked the nagios.log this is wat i get but my gmail is working i am
sending email right now
[1191443852] Warning: Attempting to execute the command "/usr/bin/printf
"%b" "***** Nagios 2.9 *****\n\nNotification Type: PROBLEM\nHost:
Test1\nState: DOWN\nAddress: 10.8.2.40\nInfo: PING CRITICAL - Packet loss =
100%\n\nDate/Time: Wed Oct 3 15:37:32 CDT 2007\n" | /bin/mail -s "Host DOWN
alert for Test1!" nedo72 at gmail.com" resulted in a return code of 127. Make
sure the script or binary you are trying to execute actually exists...
someone any clues
On 10/3/07, Jim Perrin <jperrin at gmail.com> wrote:
>
> On 10/3/07, Nedim Bicic <nedo72 at gmail.com> 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.
> >
> > something has to be tweaked for sure any help
>
> Did you set your contacts up so that they recieve notifications?
>
> --
> During times of universal deceit, telling the truth becomes a
> revolutionary act.
> George Orwell
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071003/801cabd9/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