Issue with command definition
Posted: Thu Feb 24, 2011 10:40 am
Hello
I'm a new user of nagios, I already managed to create multiple devices , services..etc...
Now I have an error that I don't understand
i have create a new command
define command {
command_name check_snmpv1
command_line $USER1$/check_snmp -C public -H $HOSTADDRESS$ -o $ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG
5$ -u $ARG4$
}
this command is in a file ( commands.cfg ) which is read by nagios ( I'm sure of this as all the other commands are in this file ..)
I created some services with this command , but I have the following error while verifying the nagios.cfg
-------------
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/etc/nagios/hostgroups.cfg'...
Processing object config directory '/usr/local/etc/nagios/objects'...
Processing object config file '/usr/local/etc/nagios/objects/timeperiods.cfg'...
Processing object config directory '/usr/local/etc/nagios/objects/hosts'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/localhost.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/Cerber.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/Downloads.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/HP3052N.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/Free_fr_GW.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/esx01.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/esx02.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/ESX00.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/bc-mgmt1.cfg'...
Processing object config directory '/usr/local/etc/nagios/objects/services'...
Processing object config file '/usr/local/etc/nagios/objects/services/localhost.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/CERBER.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/ESX00.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/HP3052N.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/Downloads.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/Free_fr_GW.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/IBM.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/printer.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/contacts.cfg'...
Processing object config directory '/usr/local/etc/nagios/objects/backup'...
Processing object config directory '/usr/local/etc/nagios/objects/backup/services'...
Processing object config directory '/usr/local/etc/nagios/objects/backup/hosts'...
Processing object config file '/usr/local/etc/nagios/objects/templates.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/commands.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Error: Service check command 'check_snmpv1' specified in service 'Chassis Cooling - Bay 1' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Chassis Cooling - Bay 2' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Domain 1: Utilization' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Domain 2: Utilization' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 1' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 1 Fans' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 2' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 2 Fans' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 3' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 3 Fans' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 4' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 4 Fans' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Temperature' for host 'bc-mgmt1' not defined anywhere!
Checked 34 services.
Checking hosts...
Warning: Host 'bc-mgmt1' has no default contacts or contactgroups defined!
Checked 9 hosts.
Checking host groups...
Checked 9 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 1
Total Errors: 13
------------------------
any insight ? I guess I'm missing something basic but i don't see what...
Thx
I'm a new user of nagios, I already managed to create multiple devices , services..etc...
Now I have an error that I don't understand
i have create a new command
define command {
command_name check_snmpv1
command_line $USER1$/check_snmp -C public -H $HOSTADDRESS$ -o $ARG1$ -w $ARG2$ -c $ARG3$ -l $ARG
5$ -u $ARG4$
}
this command is in a file ( commands.cfg ) which is read by nagios ( I'm sure of this as all the other commands are in this file ..)
I created some services with this command , but I have the following error while verifying the nagios.cfg
-------------
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/etc/nagios/hostgroups.cfg'...
Processing object config directory '/usr/local/etc/nagios/objects'...
Processing object config file '/usr/local/etc/nagios/objects/timeperiods.cfg'...
Processing object config directory '/usr/local/etc/nagios/objects/hosts'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/localhost.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/Cerber.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/Downloads.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/HP3052N.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/Free_fr_GW.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/esx01.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/esx02.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/ESX00.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/hosts/bc-mgmt1.cfg'...
Processing object config directory '/usr/local/etc/nagios/objects/services'...
Processing object config file '/usr/local/etc/nagios/objects/services/localhost.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/CERBER.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/ESX00.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/HP3052N.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/Downloads.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/Free_fr_GW.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/services/IBM.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/printer.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/contacts.cfg'...
Processing object config directory '/usr/local/etc/nagios/objects/backup'...
Processing object config directory '/usr/local/etc/nagios/objects/backup/services'...
Processing object config directory '/usr/local/etc/nagios/objects/backup/hosts'...
Processing object config file '/usr/local/etc/nagios/objects/templates.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/commands.cfg'...
Read object config files okay...
Running pre-flight check on configuration data...
Checking services...
Error: Service check command 'check_snmpv1' specified in service 'Chassis Cooling - Bay 1' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Chassis Cooling - Bay 2' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Domain 1: Utilization' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Domain 2: Utilization' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 1' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 1 Fans' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 2' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 2 Fans' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 3' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 3 Fans' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 4' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Power Module Cooling - Bay 4 Fans' for host 'bc-mgmt1' not defined anywhere!
Error: Service check command 'check_snmpv1' specified in service 'Temperature' for host 'bc-mgmt1' not defined anywhere!
Checked 34 services.
Checking hosts...
Warning: Host 'bc-mgmt1' has no default contacts or contactgroups defined!
Checked 9 hosts.
Checking host groups...
Checked 9 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 1 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 24 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 1
Total Errors: 13
------------------------
any insight ? I guess I'm missing something basic but i don't see what...
Thx