Error "Unknown option" in Nagios check
Posted: Mon Mar 21, 2016 8:36 am
Hi, we have defined the host "ROZAS-SAI-AUDITORIO" in the file " hosts.cfg ", the following command "check_ups" in the file " commands.cfg " and the next service "Ups Alarm" in the file " services" :
define host{
use generic-switch
host_name ROZAS-SAI-AUDITORIO
alias ROZAS-SAI-AUDITORIO
address 192.168.2.31
hostgroups ROZAS
}
define command {
command_name check_ups
command_line $USER1$/check_ups_snmp.sh -H $HOSTADDRESS$
}
define service{
use generic-service
host_name ROZAS-SAI-AUDITORIO
service_description Ups Alarm
check_command check_ups!-C nagiosica -v 2c -p ups_alarm
normal_check_interval 30
retry_check_interval 10
notification_interval 0
register 1
}
We have Restarted the nagios service but in the web interface it appearan error and does not perform properly check (see attachment ) may be going on ? Instead through command line it works correctly :
root@snoc01debian01:/usr/local/nagios/libexec# ./check_ups_snmp.sh -H 192.168.2.31 -v 2c -C nagiosica -p ups_alarm
OK - 0 alarms present |'alarms'=0
Thank you so mutch!
define host{
use generic-switch
host_name ROZAS-SAI-AUDITORIO
alias ROZAS-SAI-AUDITORIO
address 192.168.2.31
hostgroups ROZAS
}
define command {
command_name check_ups
command_line $USER1$/check_ups_snmp.sh -H $HOSTADDRESS$
}
define service{
use generic-service
host_name ROZAS-SAI-AUDITORIO
service_description Ups Alarm
check_command check_ups!-C nagiosica -v 2c -p ups_alarm
normal_check_interval 30
retry_check_interval 10
notification_interval 0
register 1
}
We have Restarted the nagios service but in the web interface it appearan error and does not perform properly check (see attachment ) may be going on ? Instead through command line it works correctly :
root@snoc01debian01:/usr/local/nagios/libexec# ./check_ups_snmp.sh -H 192.168.2.31 -v 2c -C nagiosica -p ups_alarm
OK - 0 alarms present |'alarms'=0
Thank you so mutch!