Problems with email alerts
Christian Lahti
christian at matissenetworks.com
Wed Oct 26 19:29:27 CEST 2005
Hello List.
I am wondering if I should submit this problem to the devel list? I
have not had any luck in resolving this problem, if anyone has any idea
what the solution is I would be ever so grateful. Here is what I posted
earlier this week:
Ok, I am beating my head against a problem, need a Nagios guru. We have
a redhat box with Nagios installed, here is the package list:
nagios-devel-1.2-2.2.el4.rf
nagios-nsca-2.4-2.2.el4.rf
nagios-1.2-2.2.el4.rf
nagios-nrpe-2.0-3.2.el4.rf
nagios-plugins-nrpe-2.0-3.2.el4.rf
nagios-plugins-1.4.1-1.2.el4.rf
I have setup Nagios many times, and this installation was working
perfectly up until a week or so ago. Suddenly the notify-by-email and
host-notify-by-email stop sending email. checks are working fine, just
no notifications. to test this I force a failure, and the
/var/log/messages has:
Oct 23 21:35:56 envy nagios: SERVICE ALERT:
envy;TEST;CRITICAL;HARD;3;Connection to 10.250.100.230 failed
Oct 23 21:35:56 envy nagios: SERVICE NOTIFICATION:
chris.gmail;envy;TEST;CRITICAL;notify-by-email;Connection to
10.250.100.230 failed
This implies that the notification fired...so I create a test service to
use a new notifier called notify-by-test with this as the command:
# 'notify-by-test' command definition
define command{
command_name notify-by-test
command_line /usr/bin/printf "TEST FOR NAGIOS" | /bin/mail -s
"** test alert **" clahti at gmail.com
}
This command_line works from the normal command line as the nagios user
when run in a shell. Now I force an OK and this is what the log says:
Oct 23 21:49:47 envy nagios: SERVICE ALERT: envy;TEST;OK;HARD;3;test2
Oct 23 21:49:47 envy nagios: SERVICE NOTIFICATION:
chris.gmail;envy;TEST;OK;notify-by-test;test2
Implies that the notification went out, but I still get no mail.
Finally I change the command to:
command_line touch /tmp/THISFIRED
Repeat the above and the log shows service notification, but the
THISFIRED file does not appear, which leads me to believe Nagios is not
running the command...please tell me this is something simple and I am
being dense, I am at my wits end (I thought I was pretty good with
Nagios...)
/Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20051026/c233f788/attachment.html>
More information about the Users
mailing list