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.
check_forigate_status help
Re: check_forigate_status help
You will also need to define a host
Also, the command name needs to be changed to what you mentioned in your service definition.
Then restart the nagios service, and it should be working.
Code: Select all
define host {
host_name Fortigate100D
alias Fortigate100D
address ipofyourfortigate
register 1
}
Code: Select all
#check FortiCPU
define command{
command_name check_fortigate_status
command_line /usr/lib64/nagios/plugins/check_fortigate_status -H '$HOSTADDRESS$' -m cpu -C public -M 1 -w 80% -c 90%
}
Former Nagios Employee
Re: check_forigate_status help
THANKS!
it was what you said about :
it was what you said about :
WORKS!Also, the command name needs to be changed to what you mentioned in your service definition.
CODE: SELECT ALL
#check FortiCPU
define command{
command_name check_fortigate_status
command_line /usr/lib64/nagios/plugins/check_fortigate_status -H '$HOSTADDRESS$' -m cpu -C public -M 1 -w 80% -c 90%
}
Re: check_forigate_status help
Glad we were able to help. We'll lock this thread now and feel free to open another should you require assistance with anything else.
Be sure to check out the Knowledgebase for helpful articles and solutions!