locked
Different recovery tasks with in a Management Pack RRS feed

  • Question

  • Hi Team,

    Wehave a MP with 5 web servers. with all the customized url monitors and service monitors which is working fine. now we intend to move further by creating auto recovery tasks. 

    My scenario:
    We have a service monitor  which has 2 different recovery tasks, like if the service is failed on server 1 it can directly use the net start command to get back online but on server 2-5 i have a different process for which we have to use a script based recovery task. 

    My Querry :
    how can i make it work. can i have 2 different recovey tasks on a single service monitor. when server2-5 fails it should run the script where as when the service is failed on server 1 it should use only netstart command.

    please let me know if i am not clear.

    -vrkumar01
    • Changed type vrkumar01 Sunday, February 7, 2010 5:11 PM
    Thursday, January 28, 2010 2:18 PM

Answers

  • as far as i can see that's not a valid batch file.

    include/init.bat is probably a dir include relative to the batchfile's location. ".\include\init.bat" would work then but only if the working dir when calling the batch is the batch file's location.

    Rob Korving
    http://jama00.wordpress.com/
    • Marked as answer by vrkumar01 Monday, February 8, 2010 4:42 AM
    Sunday, February 7, 2010 5:31 PM

All replies

  • Hi

    You can do this - overrides can be targetted against recovery tasks to allow you to target recovery 1 at server A and recovery 2 at server B. This is an example:
    http://systemcentersolutions.files.wordpress.com/2010/01/overridediagnostic.jpg

    You'll see there that monitors with diagnostics and recoveries also have options for overriding those diagnostics and recoveries.

    Cheers

    Graham
    View OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/
    Thursday, January 28, 2010 2:40 PM
  • Hey thaks for help and i have created the neccessary recovery tasks and overrides.

    i came across a new problem may be bit related to scripting which i am not wel versed. For one of the service restart on a webserver our web developer wrote a .bat file which runs properlly on the local computer but failes to run from SCOM console. when i do health explorer i see an error

    Error

     

     

    'include' is not recognized as an internal or external command,
    operable program or batch file.
    'include' is not recognized as an internal or external command,
    operable program or batch file.
    

    Exit Code: 1


    after doing some research i found these commands inside the batch file

    call include/init.bat

    sc \\localhost start %BATCHSERVER_SERVICE_NAME%

    call include/end.bat

    not sure what to do next any help would be really helpfull. please let me know if you need any further information.

    Saturday, February 6, 2010 4:53 PM
  • as far as i can see that's not a valid batch file.

    include/init.bat is probably a dir include relative to the batchfile's location. ".\include\init.bat" would work then but only if the working dir when calling the batch is the batch file's location.

    Rob Korving
    http://jama00.wordpress.com/
    • Marked as answer by vrkumar01 Monday, February 8, 2010 4:42 AM
    Sunday, February 7, 2010 5:31 PM
  • Thanks for the response Rob.

    specified the working directory and the worked...............Thanks once again.

    -vrkumar01
    Monday, February 8, 2010 4:42 AM