Workaround for “Service check did not exit properly”

The problem is the ePN (Embedded Perlinterpreter for Nagios)

If you enable Debugging in Nagios, you get the following error:


HOST: somehost, SERVICE: CPU, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: No, RETURN CODE: 3, OUTPUT: **ePN failed to compile /some/dir/plugins/check_fortigate.pl: “String found where operator expected at (eval 17) line 94, near “case “cpu””” at /usr/lib/nagios3/p1.pl line 250.

The workaround is to disable the ePN by inserting the following String an the second line in the check_fortigate.pl-script


# nagios: -epn