check_forigate_status help
Posted: Thu Jan 21, 2016 10:04 am
Hello,
im using :
Nagios Core 4.1.1
on CentOS release 6.7 VM .
i have downloaded this external plugin :
https://exchange.nagios.org/directory/P ... us/details
and add it to my /usr/lib64/nagios/plugins/
i have made a test throw the CLI by the directions :
root@localhost: ~#/usr/lib64/nagios/plugins/check_fortigate_status -H 172.10.170.99 -m cpu -C public -M 1 -w 80% -c 90%
FortiGate-100D: OK, CPU Usage: 23%| CPU Usage=23%;80%;90%
but when i set it in the commend.cfg and switch.cfg it fives an error :
commend.cfg set :
#check FortiCPU
define command{
command_name CPU
command_line /usr/lib64/nagios/plugins/check_fortigate_status -H '$HOSTADDRESS$' -m cpu -C public -M 1 -w 80% -c 90%
}
and then i ran : /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg and its error free.
but after i set it on switch.cfg :
#define service{
# use generic-service ; Inherit values from a template
# host_name Fortigate100D
# service_description CPU
# check_command check_fortigate_status
# }
it shows :
Error: Service check command 'check_fortigate_status' specified in service 'CPU' for host 'Fortigate100D' not defined anywhere
i know im doing somthing worng at switch.cfg please help.
im using :
Nagios Core 4.1.1
on CentOS release 6.7 VM .
i have downloaded this external plugin :
https://exchange.nagios.org/directory/P ... us/details
and add it to my /usr/lib64/nagios/plugins/
i have made a test throw the CLI by the directions :
root@localhost: ~#/usr/lib64/nagios/plugins/check_fortigate_status -H 172.10.170.99 -m cpu -C public -M 1 -w 80% -c 90%
FortiGate-100D: OK, CPU Usage: 23%| CPU Usage=23%;80%;90%
but when i set it in the commend.cfg and switch.cfg it fives an error :
commend.cfg set :
#check FortiCPU
define command{
command_name CPU
command_line /usr/lib64/nagios/plugins/check_fortigate_status -H '$HOSTADDRESS$' -m cpu -C public -M 1 -w 80% -c 90%
}
and then i ran : /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg and its error free.
but after i set it on switch.cfg :
#define service{
# use generic-service ; Inherit values from a template
# host_name Fortigate100D
# service_description CPU
# check_command check_fortigate_status
# }
it shows :
Error: Service check command 'check_fortigate_status' specified in service 'CPU' for host 'Fortigate100D' not defined anywhere
i know im doing somthing worng at switch.cfg please help.