Quantcast
Channel: SCN : Discussion List - SAP Solution Manager
Viewing all articles
Browse latest Browse all 5781

Issue with OS script in MAI

$
0
0

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:

Remote_os_output.jpg

The return is fetch correctly

 

In the monitoring piece, I get this, in case of the script returns exit=1

 

metric_exit_1.jpg

 

My metric definitions are:

 

Metric_def_1.jpgMetric_def_2.jpgMetric_def_3.jpg

 

Could someone helpd to understand where the problem with this os script metric is?


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>