question

TBingeman avatar image
0 Votes"
TBingeman asked StefanHorz commented

Need help with getting runbook to loop over 3 runs

I have a runbook that monitors the SSRS service on our SSRS servers. We would like to set it so that it runs but only emails if there have been 3 failures in a row for the service. I am new to Orchestrator and am not sure how to go about setting this up. I have attached the export of the job to the post and am wondering if anyone would be able to help me figure out what to do to get this to work the way we envision.

129986-ssrs-monitoringois-export.txt


msc-orchestrator
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

StefanHorz avatar image
1 Vote"
StefanHorz answered TBingeman commented

Hi @TBingeman,

Re-Design your Runbooks.
One with the "Run .Net Script" Activity which checks and tries to start the service. In the "Initialize Data" Activity define the Parameter ComputerName. And in properties of this Runbook define the "RerturnData" whether an EMail is needed.
130087-checkservice-1-doing.jpg

In the Monitoring Runbook invoke the first one an pass the ComputerName from the "Read Line" Activity.
130123-checkservice-2-trigger1.jpg

Enable Looping for the "Invoke Runbook Activity". (he delay is in seconds).
130151-checkservice-2-trigger2loop.jpg
Define in Exit condition in the Loop if email is not needed an the max attempt of 3 (common published data).
130152-checkservice-2-trigge32loop-exit.jpg

130115-ssrs-monitoring-stefan-ois-export.txtSend the Mail if the Runbook still returns EMailIsNeeded after 3 attempts.

Regards,
Stefan



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@StefanHorz ,

It is not that we want the second runbook to loop, it is more that on the third time a server shows the SSRS service as not running we want the email to be sent. This entire chain is set to run every 5 minutes so this would effectively let us know that the SSRS service has been down for 15 minutes.

0 Votes 0 ·
StefanHorz avatar image
0 Votes"
StefanHorz answered TBingeman commented

So, set "Monitor/Date time" to trigger every 15 Minutes. And the delay in the loop to 300 seconds.
Orchestrator is a great product for IT-Processs-Automation. For Monitoring purposes i would prefer System Center Operations Manager (SCOM).
Good luck!
Stefan

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @StefanHorz ,

I set up everything you had suggested but when I go to run the setup, it only runs through 1 server at a time instead of my entire list of servers. Is there any way to get it to run through the entire list at the same time as I have the secondary runbook set up with concurrency?

0 Votes 0 ·
StefanHorz avatar image
0 Votes"
StefanHorz answered StefanHorz commented

Hi @TBingeman,
yes, Orchestrator is designed for IT-process-automation and not for Monitoring. With Monitoring Tools like SCOM the monitors run on an local agent, here it runs on the Runbook Server(s).
Anyway, if you want the solution for Orchestrator with concurrent jobs. I think you need to Runbooks:

  • One with "Monitor Date/Time" and "Invoke Runbook" with each line.

  • The second with a "Job concurrency" of the number of Servers that should be checked, invoked by each line. And the loop I tried to describe above

  • The third perhaps also with a "Job concurrency". which checks the Service an tries the restart.


I will upload an export here.

If you really want it like in the export check: https://docs.microsoft.com/en-us/system-center/orchestrator/how-to-configure-runbook-throttling?view=sc-orch-2019

Regards,
Stefan130819-ssrs-monitoringois-export.txt




· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @StefanHorz ,

Thank you very much. This resolved my issue.

0 Votes 0 ·

Glad lo help! Thanks for you feedback!

0 Votes 0 ·