Nagios integration problem

Hello Risker,

First Thank you for your contribution it will help me a lot at work.

Man, im heaving a hard time to use this

Manually it works perfect well as u can see it below:

OK: Fortigate Dinamica (Master: FGT80CXXXXXXXXX): IPSEC Tunnels: Configured/Active: 1/1 |’ActiveSSL-VPN’=0 ‘ActiveIPSEC’=1

I already declared the command at commands.cfg like this:

define command {
command_name check_fortigate_cpu
command_line $USER1$/check_fortigate.pl -H $HOSTADDRESS$ -C $ARG1$ -T cpu
}

and use the check like this

check_fortigate_cpu!public

but i receive this at nagios webportal

(Service check did not exit properly)

Do you have any ideias about how to fix this?

Thanks in advance.

Allan Lago