(Of course, I replaced the username, password and hostaddress with all the appropriate info.)
and I got the following output on the monitoring server. [TABLE]
[TR]
[TD=“class: dataVal”]awk: line 8: syntax error at or near )
awk: line 13: syntax error at or near if
awk: line 24: syntax error at or near exit
CRIT Threads_connected / max_connections (pct) = 1.986755[/TD]
[/TR]
[TR]
[TD=“class: dataVar”]Performance Data:[/TD]
[TD=“class: dataVal”]Threads_connected/max_connections=1.986755;80;95$;0;100[/TD]
[/TR]
[/TABLE]
can someone tell me how to fix it ?
Sorry, I am new to nagios.
Thanks for looking at my post and for your help in advance.
desmondkan, can you run the full command with “sh -x” to get the error with “awk” command, e.g.
sh -x /usr/lib64/nagios/plugins/pmp-check-mysql-status -l user -p pass -H somehost -x Threads_connected -o / -y max_connections -T pct -w 80 -c 95
Unfortunately, there are no errors in the output like you posted initially:
awk: line 8: syntax error at or near )
awk: line 13: syntax error at or near if
awk: line 24: syntax error at or near exit
Please re-run the similar sh -x command for debugging purpose once you get the errors with awk to track it down.
That’s true. I don’t see the errors anymore if I ran the command manually but I am still getting the same error message If I put the same command into the nrpe_local.cfg (which is on the remote server).
I guess my syntax is NOT right in the cfg file or should I put this command into the monitoring server instead of the remote server?
could you tell me where I should define the command if I should put this command into the monitoring server?
The command like this “pmp-check-mysql-status -l $USER3$ -p $USER4$ -H $HOSTADDRESS$ -x Threads_connected -o / -y max_connections -T pct -w 80 -c 95” should go to the nagios config and nagios replaces those vars with the respective values.