duplicate command definitions in minimal.cfg
Olaf Hering
olh at suse.de
Fri Sep 8 14:54:34 CEST 2006
We have this in our rpm specfile to get a working config, based on the
installed -sample files:
...
for i in $RPM_BUILD_ROOT/etc/nagios/*-sample ; do
mv $i ${i%%-sample}
done
cp -vf sample-config/template-object/minimal.cfg \
$RPM_BUILD_ROOT/etc/nagios/minimal.cfg-sample
...
This leads to the errors below. It would be nice if the defaults can
work out of the box. Maybe they could even provide a limited config for
localhost, I havent checked how it could look in practice.
Error: Command 'check-host-alive' has already been defined
Error: Could not register command (config file '/etc/nagios/minimal.cfg', starting on line 76)
Error: Command 'check_local_disk' has already been defined
Error: Could not register command (config file '/etc/nagios/minimal.cfg', starting on line 92)
Error: Command 'check_local_load' has already been defined
Error: Could not register command (config file '/etc/nagios/minimal.cfg', starting on line 117)
Error: Command 'check_local_procs' has already been defined
Error: Could not register command (config file '/etc/nagios/minimal.cfg', starting on line 109)
Error: Command 'check_local_users' has already been defined
Error: Could not register command (config file '/etc/nagios/minimal.cfg', starting on line 101)
Error: Command 'check_ping' has already been defined
Error: Could not register command (config file '/etc/nagios/minimal.cfg', starting on line 84)
Error: Command 'host-notify-by-email' has already been defined
Error: Could not register command (config file '/etc/nagios/minimal.cfg', starting on line 68)
Error: Command 'notify-by-email' has already been defined
Error: Could not register command (config file '/etc/nagios/minimal.cfg', starting on line 59)
---
sample-config/template-object/minimal.cfg.in | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
Index: nagios-2.5/sample-config/template-object/minimal.cfg.in
===================================================================
--- nagios-2.5.orig/sample-config/template-object/minimal.cfg.in
+++ nagios-2.5/sample-config/template-object/minimal.cfg.in
@@ -57,7 +57,7 @@ define timeperiod{
# notifications (about service alerts) to contacts.
define command{
- command_name notify-by-email
+ command_name notify-by-email-disabled
command_line /usr/bin/printf "%b" "***** Nagios @VERSION@ *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | @MAIL_PROG@ -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
@@ -66,7 +66,7 @@ define command{
# notifications (about host alerts) to contacts.
define command{
- command_name host-notify-by-email
+ command_name host-notify-by-email-disabled
command_line /usr/bin/printf "%b" "***** Nagios @VERSION@ *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | @MAIL_PROG@ -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
@@ -74,7 +74,7 @@ define command{
# Command to check to see if a host is "alive" (up) by pinging it
define command{
- command_name check-host-alive
+ command_name check-host-alive-disabled
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 99,99% -c 100,100% -p 1
}
@@ -82,7 +82,7 @@ define command{
# Generic command to check a device by pinging it
define command{
- command_name check_ping
+ command_name check_ping-disabled
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
}
@@ -90,7 +90,7 @@ define command{
# Command used to check disk space usage on local partitions
define command{
- command_name check_local_disk
+ command_name check_local_disk-disabled
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}
@@ -99,7 +99,7 @@ define command{
# local machine
define command{
- command_name check_local_users
+ command_name check_local_users-disabled
command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
}
@@ -107,7 +107,7 @@ define command{
# Command to check the number of running processing on the local machine
define command{
- command_name check_local_procs
+ command_name check_local_procs-disabled
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$
}
@@ -115,7 +115,7 @@ define command{
# Command to check the load on the local machine
define command{
- command_name check_local_load
+ command_name check_local_load-disabled
command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
More information about the Developers
mailing list