Error in misccommands.cfg
Posted: Sun Dec 15, 2013 12:50 pm
Hello everyone,
this is my first post, so i want to introduce myself shortly:
My Name is Julian, i am 21 years old and live in Duisburg, Germany.
I recently installed Nagios on Ubuntu 12.04 LTS with this instruction:
http://askubuntu.com/questions/145518/h ... all-nagios
After that i installed nconf as my Configuration Tool.
Everything fine, until i installed the NSClient++ on a virtual machine and tried to let it show in my Nagios Host-Overview.
Now i got the known Error Message: Could not read host and service status information!
I also got this Information:
looking in the misccommands.cfg and i don't see anything, which could be wrong:
I would really appreciate it, if someone could help me to get it on working again.
Adding the host on nconf, was without an Instruction, which was not really clever for me as a beginner
this is my first post, so i want to introduce myself shortly:
My Name is Julian, i am 21 years old and live in Duisburg, Germany.
I recently installed Nagios on Ubuntu 12.04 LTS with this instruction:
http://askubuntu.com/questions/145518/h ... all-nagios
After that i installed nconf as my Configuration Tool.
Everything fine, until i installed the NSClient++ on a virtual machine and tried to let it show in my Nagios Host-Overview.
Now i got the known Error Message: Could not read host and service status information!
I also got this Information:
Code: Select all
Warning: Duplicate definition found for command 'check-host-alive' (config file '/etc/nagios3/global/misccommands.cfg', starting on line 26)
Error: Could not add object property in file '/etc/nagios3/global/misccommands.cfg' on line 27.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
* errors in config!
[fail]
Code: Select all
define command {
command_name service_is_stale
command_line /usr/lib/nagios/plugins/eventhandlers/stale_service.sh
}
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $$
}
define command {
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\n$
}
define command {
command_name process-host-perfdata
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> $
}
define command {
command_name process-service-perfdata
command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERV$
}
}
define command {
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
Adding the host on nconf, was without an Instruction, which was not really clever for me as a beginner