Need help with getting runbook to loop over 3 runs

TBingeman 81 Reputation points
2021-09-07T21:22:06.28+00:00

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

System Center Orchestrator
System Center Orchestrator
A family of System Center products that provide an automation platform for orchestrating and integrating both Microsoft and non-Microsoft IT tools.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Stefan Horz 3,471 Reputation points
    2021-09-08T07:15:00.277+00:00

    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 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Stefan Horz 3,471 Reputation points
    2021-09-08T17:51:40.33+00:00

    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


  2. Stefan Horz 3,471 Reputation points
    2021-09-09T21:07:00.693+00:00

    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://learn.microsoft.com/en-us/system-center/orchestrator/how-to-configure-runbook-throttling?view=sc-orch-2019

    Regards,
    Stefan130819-ssrs-monitoringois-export.txt


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.