Nagios fails to start after adding 'check_logs.pl' service
Bret Goodfellow
Bret.Goodfellow at questar.com
Thu Aug 14 17:10:19 CEST 2008
I have started monitoring the nagios server (local checks), and all has
worked fine until I added a service to check the local logs. When the
'check_local_logs' service is added, the startup of Nagios fails after
about 10 seconds. I have also run 'strace' but am not sure how to
interpret.
Thanks in advance,
Bret Goodfellow
Here is the output in /var/log/messages:
Aug 14 08:56:29 colorado nagios: Nagios 2.10 starting... (PID=6939) Aug
14 08:56:29 colorado nagios: LOG VERSION: 2.0 Aug 14 08:56:29 colorado
nagios: Warning: Contact 'oc02497' is not a member of any contact
groups!
Aug 14 08:56:29 colorado nagios: Warning: Contact 'oc02571' is not a
member of any contact groups!
Aug 14 08:56:29 colorado nagios: Warning: Contact 'oc03101' is not a
member of any contact groups!
Aug 14 08:56:29 colorado nagios: Warning: Contact 'oc03214' is not a
member of any contact groups!
Aug 14 08:56:29 colorado nagios: Warning: Contact 'oc09687' is not a
member of any contact groups!
Aug 14 08:56:29 colorado nagios: Warning: Contact group
'oracle-admins-oncall' is not used in any host/service definitions or
host/service escalations!
Aug 14 08:56:29 colorado nagios: Warning: Contact group 'web-dev' is not
used in any host/service definitions or host/service escalations!
Aug 14 08:56:29 colorado nagios: Warning: Contact group 'web-dev-page'
is not used in any host/service definitions or host/service escalations!
Aug 14 08:56:29 colorado nagios: Finished daemonizing... (New PID=6940)
Aug 14 08:56:41 colorado nagios: Caught SIGSEGV, shutting down...
Here is the command definition:
# 'check_local_logs' command definition
define command{
command_name check_local_logs
command_line $USER1$/check_logs.pl -c $ARG1$
}
Here is the service defintion:
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Service definition: check_local_logs for linux #
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++
# + this is a TEST service which looks for "HELLO THERE!" in
/var/log/messages + #
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++
define service{
use generic-service ; Name
of service template to use
host_name colorado
service_description Scan Logs - linux
is_volatile 0
check_period 24x7
max_check_attempts 1
normal_check_interval 1
retry_check_interval 1
contact_groups linux-admins,linux-admins-page
notification_interval 1440
notification_period 24x7
notification_options c
check_command
check_local_logs!/etc/nagios/check_logs_linux.cfg!
}
Here is the host defintion:
########################################################################
##############
# 'colorado' host definition
#
########################################################################
##############
define host{
use generic-host ; Name of host
template to use
host_name colorado
alias colorado
address 10.8.64.201
check_command check-host-alive
contact_groups
linux-admins,linux-admins-page,oracle-admins
max_check_attempts 10
max_check_attempts 10
notification_interval 480
notification_period 24x7
notification_options d,u,r
}
Here is a copy of /etc/nagios/check_logs_linux.cfg
# /etc/nagios/check_logs_linux.cfg
$seek_file_template='/var/log/nagios/$log_file.check_log.linux.seek';
@log_files = (
{'file_name' => '/var/log/messages',
'reg_exp' => 'HELLO THERE!',
},
);
1;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080814/4bd4c525/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- 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