not receiving the nagios notifications

Felipe Tocchetto felipe at tocchetto.com
Fri Jul 21 20:27:43 CEST 2006


Hi All

I have a nagios 2.4 here, I already insert some hosts to it monitor.
But when a host goes down, the nagios system do not send me the
notifications by email.

I think all my confs files are just ok. I don´t have a clue for what
is happening.

Here is the way I configured it:

The hosts.cfg file:

define host{
       host_name       teste.xxx.xxxx.br
       alias           Test Machine
       address         200.xxx.xx.xx
       check_command   check-host-alive
       max_check_attempts      2
       checks_enabled          1
       active_checks_enabled   1
       passive_checks_enabled  1
       check_interval          1
       process_perf_data       0
       retain_status_information       1
       retain_nonstatus_information    1
       notification_interval   15
       contact_groups          suporte-local
       notification_period     24x7
       notification_options    d,u,r
       notifications_enabled   1
       stalking_options        o,d,u
       }

Ok, notifications_enabled   1

So the contat group that it had to send the emails:

cat contactgroups.cfg
define contactgroup{
       contactgroup_name       suporte-local
       alias                   suporte
       members                 felipe
       }

In this case, just me, Felipe, so I put my email in the contacts.cfg file

define contact{
       contact_name    felipe
       alias   Felipe Tocchetto
       host_notification_period        24x7
       service_notification_period     24x7
       host_notification_options       d,u,r,n
       service_notification_options    w,u,c,r,n
       host_notification_commands      host-notify-by-email
       service_notification_commands   notify-by-email
       email   felipe at valid-domain.br
       }

The host-notify-by-email e notify-by-email commands, in miscconmands.cfg:

# 'host-notify-by-email' command definition
define command{
       command_name    host-notify-by-email
       command_line    /usr/bin/printf "%b" "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\
nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail -s "Host
$HOS
TSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
       }

# 'notify-by-email' command definition
define command{
       command_name    notify-by-email
       command_line    /usr/bin/printf "%b" "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVI
CEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\
n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert -
$HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTE
MAIL$
       }


When I type mannualy the commands, a receive the email from the nagios
Machine...

Does any body know what is happening?

-- 
Felipe L. Tocchetto
http://felipe.tocchetto.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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