Hi All,
I have a small problem with perl plugin for nagios 3.
Problem is with printf function:
elsif ($clients_conn < $opt_w) {
printf("OK: Clients connected: %d | CPU Usage: %d\n", $clients_conn, $cpusage);
exit $ERRORS{"OK"}
}
this is giving me an error from embaded perl of nagios:
**ePN /usr/lib/nagios/plugins/check_fms_1.pl: "Argument "" isn't numeric in sprintf at /usr/lib/nagios3/p1.pl line 81,"
But code work nice if I use it from a shell.
If I delete $cpusage varible and corresponding %d error dissapers.
Do anybody have any idea why this is happening?
I have a small problem with perl plugin for nagios 3.
Problem is with printf function:
elsif ($clients_conn < $opt_w) {
printf("OK: Clients connected: %d | CPU Usage: %d\n", $clients_conn, $cpusage);
exit $ERRORS{"OK"}
}
this is giving me an error from embaded perl of nagios:
**ePN /usr/lib/nagios/plugins/check_fms_1.pl: "Argument "" isn't numeric in sprintf at /usr/lib/nagios3/p1.pl line 81,"
But code work nice if I use it from a shell.
If I delete $cpusage varible and corresponding %d error dissapers.
Do anybody have any idea why this is happening?