locked
Dynamic Alert Description RRS feed

  • Question

  •  Is there a way i can change the Alert Description text based on some logic 

    <DisplayStrings> <DisplayString ElementID="AppData.Monitoring.AssetVolume.StatusMonitor"> <Name>Asset Volume Not Healthy</Name> <Description>The Asset Volume has reached {0} size.Please contact support team.</Description> </DisplayString> </DisplayStrings

    Now if i want to add some logic like if AlertParameter1>115 then Description should be "Asset volume is unhealthy and services {1} need to be restarted"

    else <Description>The Asset Volume has reached {0} size.Please contact support team.</Description>

    Display string can allow the AlertParameter substitution,what if i need to have some logic on 2 Alert parameters and customize the Display string based on result.

    I am new to SCOM and i Googled about this scenario but have not found any hint to do that.


    Monday, April 17, 2017 7:36 AM

All replies

  • Hi Sanjay,

    As far as i know scom alert description cannot be dynamic in nature. However, i leave it to other experts to share their opinions on this.


    If a post answers your question, please click Mark As Answer; on that post and; Vote as Helpful. You can also connect with me on Twitter @tadgata, and my blog https://tadgata.wordpress.com

    Sunday, April 30, 2017 12:48 PM
  • You can add variables to the alert that get populated when it gets triggered. It's not always easy to know what works, so some experimentation has to be done. Though you can start with this to get an overview of what you can potentially use for different types of modules. 

    https://blogs.technet.microsoft.com/kevinholman/2007/12/12/adding-custom-information-to-alert-description-s-and-notifications/

    As an example you could have a monitor with this in it:

    <AlertParameters>
        <AlertParameter1>$Target/Property[Type="MSSCNTLIB!Microsoft.SystemCenter.NTService"]/DisplayName$</AlertParameter1>
        <AlertParameter2>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/DNSName$</AlertParameter2>
        <AlertParameter3>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/IPAddress$</AlertParameter3>
    </AlertParameters>

    And display string:

    <DisplayString ElementID="My.Services.Monitor.AlertMessage">
    <Name>My Service Alert</Name>
    <Description>Alert for service: {0}
    on {1} with IP: {2}
    The service has been in the stop state past the allowed time window.
    Investigate why the service has stopped.</Description>
    </DisplayString>


    • Proposed as answer by Tadgata Monday, May 1, 2017 4:37 AM
    Sunday, April 30, 2017 2:27 PM
  • Hi sanjay,

    you can make an alert dynamic in nature using simple trick, refer below link for more information on the same. 

    https://blogs.technet.microsoft.com/kevinholman/2015/02/20/can-alert-names-contain-dynamic-data/

     


    sridhar v

    • Proposed as answer by Tadgata Tuesday, May 2, 2017 5:15 AM
    Monday, May 1, 2017 1:56 PM