Hello community,
I try to use the remote script option in MAI for a metric. But do not get the right results. I have activated the remote os scipt for E2E and can excute the script from there with the right return codes. But when Im configuring the Metric, I just get the right result, when the script was returns code = 0
This is my OS script which should check a specific URL. If Wget is fine, then it should exit with = 0 if WGET is not OK, then exit=1
#!/bin/sh
eval "wget 'http://<my_url>8081/sap/public/ping'"
l_rc=$?
if [[ $l_rc = 0 ]]; then
echo ok!!!!
rm ./ping
exit 0
else
echo not ok
exit 1
fi
In E2E, everything is working perect:
The return is fetch correctly
In the monitoring piece, I get this, in case of the script returns exit=1
My metric definitions are:
Could someone helpd to understand where the problem with this os script metric is?