check_log
andre at peixoto.com.br
andre at peixoto.com.br
Mon Dec 1 13:58:26 CET 2003
People,
Sorry to bring this subject up again, but i still cannot solve
it...
Problem: check_log does not send notifications
Description: i'm checking a local a file (/var/log/auth.log), i
have chmoded it to be readable by others. i have set old file to be same
to a place where nagios has write permissions. The web interface shows the
correct info (it shows ok state when nothing happens, and it shows
critical state when my pattern is found). I have used complex patterns at
first, and then change to simple patterns, like "BAD" (without the
quotes), and still not working. Something that i noticed is that
/var/log/maillog is not even touched when this service reaches critical
state. Marc has already tried to help, changing the printf command to
echo, but it doesn't solved the problem...
Files:
#
# CYCLOPE
#
define host{
use generic-host
host_name cyclope
alias Cyclope
address 96.1.1.22
}
services.cfg
------------
#
# CYCLOPE AUTH LOG
#
define service{
use generic-service
host_name cyclope
service_description AUTH_LOG
contact_groups producao
check_command
check_log!/var/log/auth.log!/var/tmp/auth.log.nagios!'.*BAD.*\|.*FAIL.*\|.*REFUSED.*'
}
checkcommands.cfg
------------------
# 'check_log' command definition
define command{
command_name check_log
command_line $USER1$/check_log -F $ARG1$ -O
$ARG2$ -q $ARG3$
}
misccommands.cfg
------------------
# '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: $SERVICEDESC$\nHost:
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /usr/bin/mail -s "**
$NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
$CONTACTEMAIL$
}
Info:
Operating System: FreeBSD 4.9 Stable Release
Nagios version: 1.1 (from ports collection)
Nagio plugins version: 1.3.0 (from ports collection)
Any help apreciatted
Obrigado,
André Luiz de Lemos Barros
3218-5617/9102-0145
Equipe de Suporte
Peixoto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20031201/bd5ada91/attachment.html>
More information about the Users
mailing list