Quantcast
Channel: Operations Manager - General forum
Viewing all articles
Browse latest Browse all 11941

Rule to look for an specific event in Operations Manager log and trigger .bat file which stores ping results into a text file

$
0
0

Hi Experts,

I have been facing heartbeat issues with a specific client for a long period of time. The issues is mainly realated to network connectivity. 

When i point this out the network team, they come back with real time results saying no issues with networks. So i decided to create an event collectionRule to look for an specific event in Operations Manager log ( in this case event id : 20022 with gateway server name in event description whcih failed to heart beat) and trigger .bat file which stores ping results into a text file. I did this because i suspect packet loss during the time heartbeat issue occurs.

I tried this in my test enviornment and worked 80% for me. The rule is catching the test event that i am creating usingeventcreate command "eventcreate /t error /id 222  /l "Operations Manager" /d "xxxxxxxxservername.domain.com xxxxxxxx" and its invkoing the .bat file that i have added into the Responses ofConfigurations tab using add > run commnad and create an output text file. My .bat file contains multiple commands ( 2 pings and 2 echo's). When i manully run the .bat file, all the commands and running and results are being written into the txt file. But when the same is invoked using SCOM ( i.e when the rule picks the event id and invokes the .bat)only first command is being executed and vaules are being stored into a txt file :(

To over come this i tried to append all command into one and then write it into a text file. Even thats also only running the first command. I made 3 different responses ( 2 for ping and last one echoing timestamp), results are not coming completly and in unorderede fashion :(

Can anybody help me in this case. Even if you have VB scripts which can fullfill my reqriment and provide me the results, i will be more than happy.

Thanks and Regards,

Prajul Nambiar


Viewing all articles
Browse latest Browse all 11941

Trending Articles



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