locked
SCOM - Monitor Scheduled Tasks AND Create Recovery to Kill/Restart Specific Tasks RRS feed

  • Question

  • We have SCOM 2007 R2 and are using the Windows Scheduled Task MP by R. Burri... http://rburri.wordpress.com/2008/02/14/windows-scheduled-tasks-management-pack-for-opsmgr-2007/.  After researching what is available, this was the best choice for our environment.

    We have approx 60 scheduled tasks across several servers that our APM team has been asked to monitor.  The MP above contains a monitor called Long Running Task which allows you to monitor specific tasks on specific servers and send alerts when the task runs longer than the threshold you have set.  This part works great.  The monitor comes disabled.  I created an override to enable the monitor for each server/task item & then a 2nd override to set the threshold for  how long the task should run before an alert is sent.  So my overrides look something like this:

         Server1/SchedTask-1     Enabled = true

         Server1/SchedTask-1     Threshold = 10 minutes

         Server1/SchedTask-2     Enabled = true

         Server1/SchedTask-2     Threshold = 15 minutes

    My problem is, we have been asked to create a recovery that will kill any task that runs longer than the threshold that has been set.  Most of the thresholds are 10-30 minutes.  Several of the tasks will run longer than they should, and become hung or never stop, which results in multiple instances of the same task running.  These multiple instances interfere with each other and the application team's fix is to kill all of the instances and restart the task.  (yes, I realize the better choice would be to resolve why the task runs longer than expected, but they have not been able to determine a cause)

    With several servers/tasks using the same monitor, how can I setup a separate recovery for each instance?  I am not familiar with writing vbscripts an am new to SCOM.  The Recovery Wizard does have a Select Target field, but it only shows Scheduler 2.0 Task (time scheduled) and I don't see any options that will allow me to point to a specific server/task.

    Any advice is most appreciated.

    thx,

    LM04

    Thursday, July 12, 2012 7:02 PM

Answers


  • Hi,

    Based on my understanding and research, I think “setup a separate recovery for each instance” may not be achieved. You may need to create different monitors for the scheduled  tasks you would monitor and then create recovery tasks against the monitors separately.

    Thanks.


    Nicholas Li

    TechNet Community Support




    • Edited by Nicholas Li Monday, July 16, 2012 8:21 AM
    • Marked as answer by Nicholas Li Monday, July 30, 2012 3:35 AM
    Monday, July 16, 2012 8:15 AM
  • Sadly, you can't copy and paste monitors \ rules - you need to disable the original and then recreate your own.

    I haven't used this MP for a while but as a general answer to this part of your question - The Recovery Wizard does have a Select Target field, but it only shows Scheduler 2.0 Task (time scheduled) and I don't see any options that will allow me to point to a specific server/task.

    The recovery target has to be a class - you can't target specific objects. But when you complete the wizard, if you go back and edit your recovery, you might be able to do this via the Overrides tab on the recovery - on the overrides tab, does it allow you to set an override for a specific object of class Scheduler 2.0 Task ?

    Cheers

    Graham


    Regards Graham New System Center 2012 Blog! - http://www.systemcentersolutions.co.uk
    View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/

    • Marked as answer by Nicholas Li Monday, July 30, 2012 3:35 AM
    Tuesday, July 17, 2012 6:02 PM

All replies


  • Hi,

    Based on my understanding and research, I think “setup a separate recovery for each instance” may not be achieved. You may need to create different monitors for the scheduled  tasks you would monitor and then create recovery tasks against the monitors separately.

    Thanks.


    Nicholas Li

    TechNet Community Support




    • Edited by Nicholas Li Monday, July 16, 2012 8:21 AM
    • Marked as answer by Nicholas Li Monday, July 30, 2012 3:35 AM
    Monday, July 16, 2012 8:15 AM
  • Is there a way to copy the existing Long Running Task monitor so I can setup individual monitors for the select tasks that will require a recovery process?

    Tuesday, July 17, 2012 4:06 PM
  • Sadly, you can't copy and paste monitors \ rules - you need to disable the original and then recreate your own.

    I haven't used this MP for a while but as a general answer to this part of your question - The Recovery Wizard does have a Select Target field, but it only shows Scheduler 2.0 Task (time scheduled) and I don't see any options that will allow me to point to a specific server/task.

    The recovery target has to be a class - you can't target specific objects. But when you complete the wizard, if you go back and edit your recovery, you might be able to do this via the Overrides tab on the recovery - on the overrides tab, does it allow you to set an override for a specific object of class Scheduler 2.0 Task ?

    Cheers

    Graham


    Regards Graham New System Center 2012 Blog! - http://www.systemcentersolutions.co.uk
    View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/

    • Marked as answer by Nicholas Li Monday, July 30, 2012 3:35 AM
    Tuesday, July 17, 2012 6:02 PM