locked
Script to change the priorty of all rules and monitors in a Management Pack RRS feed

  • Question

  • Script to change the priority and severity  of all rules and monitors in a Management Pack in an override MP .We are deploying an MP in production and don't want the helpdesk to take any action on any alerts, so want to set all of them as informational.Once they are reviewed then we will delete that override mp

    Can some one help me with a script

     
    Thursday, June 12, 2014 2:34 AM

Answers

  • Is this MP sealed?  Doesn't really matter..  Unseal the MP if it is sealed.  Now you have access to the RAW XML.  Alert severity and priority have xml tags.  You should be able to do a search and replace and change all the various levels (0-3 or whatever they are) to the levels and priority you want.

    Then you can seal the mp with your own key, or just roll it into prod as an unsealed MP.

    This seems, to me, like the quickest and easiest way to make all of these changes at once.  To bulk override everything, not even sure it's still around or even works, there was a tool called Override Explorer, and you could select multiple monitors/events and create overrides.  I can't remember very much about the tool because we didn't use it much, but I think it did this with live data, meaning it connected to your management server, and you made the changes in real time.  

    Of course you wouldn't want to do this in production, so do it in a lab, then export the override mp and put it in prod.

    There is probably some snazzy way to do this with PoSh, but I am not aware of any atm.


    Regards, Blake Email: mengotto<at>hotmail.com Blog: http://discussitnow.wordpress.com/ If my response was helpful, please mark it as so, if it answered your question, then please also mark it accordingly. Thank you.

    • Proposed as answer by Michael Skov Friday, June 13, 2014 8:56 AM
    • Marked as answer by Yan Li_ Tuesday, June 24, 2014 2:38 AM
    Friday, June 13, 2014 8:03 AM
  • Hi,

    Do you mean that you don't want to get alerts or warnings from that MP? I have to say that if so, it is hard to tell whether something is wrong with your monitored objects.

    And to change the severity, we should use override, and to override bulk monitors, we may use powershll script.

    Hope the below link be helpful for you:

    http://blogs.msdn.com/b/mariussutara/archive/2007/12/17/alert-severity-and-priority-use-with-override.aspx

    Regards,

    Yan Li


    Regards, Yan Li

    • Marked as answer by Yan Li_ Tuesday, June 24, 2014 2:38 AM
    Friday, June 13, 2014 8:28 AM

All replies

  • Simply disable the notifications for them.
    Thursday, June 12, 2014 5:39 PM
  • As of now our helpdesk manually forwards the alert to Service Manage .We don't have a notification set for any of our MP .Any alert that comes in console will be actionable by helpdesk
    Thursday, June 12, 2014 6:11 PM
  • Is this MP sealed?  Doesn't really matter..  Unseal the MP if it is sealed.  Now you have access to the RAW XML.  Alert severity and priority have xml tags.  You should be able to do a search and replace and change all the various levels (0-3 or whatever they are) to the levels and priority you want.

    Then you can seal the mp with your own key, or just roll it into prod as an unsealed MP.

    This seems, to me, like the quickest and easiest way to make all of these changes at once.  To bulk override everything, not even sure it's still around or even works, there was a tool called Override Explorer, and you could select multiple monitors/events and create overrides.  I can't remember very much about the tool because we didn't use it much, but I think it did this with live data, meaning it connected to your management server, and you made the changes in real time.  

    Of course you wouldn't want to do this in production, so do it in a lab, then export the override mp and put it in prod.

    There is probably some snazzy way to do this with PoSh, but I am not aware of any atm.


    Regards, Blake Email: mengotto<at>hotmail.com Blog: http://discussitnow.wordpress.com/ If my response was helpful, please mark it as so, if it answered your question, then please also mark it accordingly. Thank you.

    • Proposed as answer by Michael Skov Friday, June 13, 2014 8:56 AM
    • Marked as answer by Yan Li_ Tuesday, June 24, 2014 2:38 AM
    Friday, June 13, 2014 8:03 AM
  • Hi,

    Do you mean that you don't want to get alerts or warnings from that MP? I have to say that if so, it is hard to tell whether something is wrong with your monitored objects.

    And to change the severity, we should use override, and to override bulk monitors, we may use powershll script.

    Hope the below link be helpful for you:

    http://blogs.msdn.com/b/mariussutara/archive/2007/12/17/alert-severity-and-priority-use-with-override.aspx

    Regards,

    Yan Li


    Regards, Yan Li

    • Marked as answer by Yan Li_ Tuesday, June 24, 2014 2:38 AM
    Friday, June 13, 2014 8:28 AM