locked
Getting the Alert name for a monitor RRS feed

  • Question

  • Hi!

    I need to get the alert name for monitors.

    There is the ManagementPackMonitorAlertSettings object.

    It has a public property AlertMessage which, here from a BizTalk monitor, contains ManagementPackElementUniqueIdentifier=f75262c2-6f30-b974-db77-eb6bb7833e99.

    Now, how do I properly get the ManagementPackStringResource that the property is pointing to?

    Currently I:

    • Convert AlertMessage to string
    • Remove ManagementPackElementUniqueIdentifier=
    • Iterate over the StringResources collection until I find a resource with a matching Id

    but, is there a better way?

    Does monitors always use ManagementPackElementUniqueIdentifier=... or can there be instances when the StringResource Name is used? (so that .GetStringResource can be used)

    /Roger


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, June 9, 2011 11:43 AM

Answers

  • Try .GetElement() method of the property

    $Your_ManagementPackMonitorAlertSettings_Object.AlertMessage.GetElement() 

    • Marked as answer by Yog Li Tuesday, June 21, 2011 11:22 AM
    Monday, June 13, 2011 10:05 AM

All replies

  • Try .GetElement() method of the property

    $Your_ManagementPackMonitorAlertSettings_Object.AlertMessage.GetElement() 

    • Marked as answer by Yog Li Tuesday, June 21, 2011 11:22 AM
    Monday, June 13, 2011 10:05 AM
  • Hi Roger,

    As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as "Answered" as the previous steps should be helpful for many similar scenarios.

    In addition, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems.

    Thanks,


    Yog Li -- Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Tuesday, June 21, 2011 11:23 AM
  • Hi!

    Sorry for the delay in anwering!

    ...AlertMessage.GetElement().DisplayName works perfectly.

    Many thanks!

    /Roger


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, June 27, 2011 11:38 AM