CheckMK problem with showing output data

Hi,

I have problem with showing data output from my Classical active and passive Monitoring checks
check_snmp -H xxxxx -C xxxx -P 2c -o .1.3.6.1.4.1.12148.9.4.1.0 | awk ‘{printf "%d\n ",p=$4}’
from this command in services tab i have output (null) but
When i check this by WATO-CONFIGURATION > hosts > edit the services of this host, do a services discovery i have good output.


I will add that the Installed / Active Rectifier rule is almost the same as TotalDC and also uses awk
The difference between the two rules is that in this inoperative, the values ​​change faster over time

Does anyone know how to solve this problem?

What is the awk code for?

Can you show the bare output of the check_snmp Nagios plugin?
And the output shown by the awk code?

Best regards

awk is for changing output data from check_snmp
check_snmp -H 10.42.190.130 -C cdscomm -P 2c -o .1.3.6.1.4.1.12148.9.4.1.0 Output of check plugin “SNMP OK - 711”
with this
check_snmp -H 10.42.190.130 -C cdscomm -P 2c -o .1.3.6.1.4.1.12148.9.4.1.0 | awk ‘{print $4}’ output is bad only in Services view in hosts > edit the services of this host, do a services discovery i have good output.
In linux shell this command also working fine

It might be because check_mk is interpreting the | as a separator for perfdata.

Try running your command in a subshell: $(your-command) and see if that does the trick for you.

Thanks for hint
Still the same “(null)” in Status detail and right now also in WATO empty field
But check right now is OK not Warring as before

Problem solved
| awk ‘{print $4" A"$7}’ I added another value to display “$7” and it works

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.