4 Replies Latest reply on Mar 7, 2014 3:22 AM by dbai

    Extracting alert messages

    dbai

      We are using the Solarwinds Information Service to retrieve the list of alerts currently in SW. Querying the Orion.AlertStatus table returns alerts but the AlertMessage field is blank. The Orion.Alerts table has several fields for storing messages but these seem to be templates with variables in them, e.g. "Current packet loss for ${NodeName} is ${%Loss}. Average Response time is ${AvgResponseTime} and is varying from ${MinResponseTime} to ${MaxResponseTime}."

       

      Is there a way to get the actual alert message that shows up in the Events tab in SW?

        • Re: Extracting alert messages
          LadaVarga

          Hello,

           

          If you want name of alert it is

          SELECT stat.AlertDefID, stat.ActiveObject, stat.ObjectType, stat.State, stat.WorkingState, stat.ObjectName, stat.AlertMessage, stat.TriggerTimeStamp, stat.TriggerTimeOffset, stat.TriggerCount, ResetTimeStamp, stat.Acknowledged, stat.AcknowledgedBy, stat.AcknowledgedTime, stat.LastUpdate, stat.AlertNotes, stat.Notes, def.name
          FROM Orion.AlertStatus as stat
          JOIN Orion.AlertDefinitions as def ON def.alertdefid=stat.alertdefid
          

           

          Other way is using events table:

          SELECT EventID, EventTime, NetworkNode, NetObjectID, EngineID, EventType, Message, Acknowledged, NetObjectType, TimeStamp
          FROM Orion.Events
          where EventType=5001 or EventType=5000
          

           

          That's events triggered by alerts

          5001 - Alert Reset

          5000 - Alert Triggered

           

          Is that enough for you?

           

          Thanks