cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with OS script in MAI

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Marcel,

I have not performed OS script monitoring as of now. But as i can see the sole purpose of your script is to check the URL, then why not use copy of existing collector SAP Ping Http.

I use it to monitor the BO F5 URL. Below is what i have configured in my system. Hope that helps

I made a copy of SAP Ping Http and assigned the values in predefined tab.

created the custom metric using this data collector and an alert assigned to custom metric

i get below screen in my dashboard

I know its off topic, but if you are struggling just for the URL monitoring, you can ignore the script and use this.

Regards

Aditya Khorana

Former Member
0 Kudos

Hello Aditya,

thanks for your suggetion, I already use this datacollector for other things too.

But in this case we have a none sap loadbalancer, where no Diagnostic agent is installed and can be installed and as for the datacollecion is getting triggered by the local installed agent only for the local url.

What I need is a more generic ones, where 1 agent can check a URL on other hosts then his own host. Which is not possible with your named datacollector.

Bye, Marcel.

Former Member
0 Kudos

Marcel,

I disagree a bit, you can make the Agent ping any URL if the DNS supports it. For example, i monitor BO dev URL with the BO Prod Agent itself.

Regards

Aditya Khorana