on 09-26-2015 9:47 AM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.