6 Replies Latest reply on Feb 5, 2014 2:05 PM by ouberlord

    Why are my Orion.Alerts StartTime and EndTime dates showing years 1899?

    scottfraley

      Hey all,

       

      I am looking into creating a query in order to get all of the Alerts (eventually from a given Date/Time) for Nodes, Interfaces, etc. and am assuming that the Orion.Alerts table is the correct one to pull said information from. So, I created this query;

       

      SELECT TOP 100 Name, Enabled, Description, StartTime, EndTime, DOW, NetObjects, Trigger, Reset, Sustained, LogFile, LogMessage FROM Orion.Alerts ORDER BY StartTime ASC

       

      ..in order to take a peek and see what I see in this table. Imagine my surprise when I saw this sample of the 16 records this query returned.

       

      <e>
        <DOW>2,3,4,5,6,7,1,</DOW>
        <Description></Description>
        <Enabled>true</Enabled>
          <EndTime>1899-12-30T23:59:59</EndTime>
        <LogFile></LogFile>
        <LogMessage></LogMessage>
        <Name>Edge Bandwidth higher than 50% used to SCOM</Name>
        <NetObjects>,22163,22164,22173,24016,23143,14633,14648,14671,14675,15826,15844,</NetObjects>
        <Reset>&lt; 50</Reset>
          <StartTime>1899-12-30T00:00:00</StartTime>
        <Sustained>0</Sustained>
        <Trigger>> 50</Trigger>
      </e>

       

      1899?!?!?

       

      The thing is, if I'm on the Orion web front end, and I go to the Alerts (Home > Alerts) page, all the dates are perfectly normal looking.

       

      e.g.
        TIME OF ALERT  ALERT NAME                 ALERT TYPE NETWORK OBJECT ...
        2/5/2014 3:04 PM Alert me when any hardware component goes into a warning or critical state Advanced Te1/1 Receive Power Sensor  
        2/5/2014 3:43 AM Alert me when a neighbor goes down           Advanced 10.187.148.18  
        2/5/2014 2:13 AM Alert me when any hardware component goes into a warning or critical state Advanced subslot 0/2 transceiver 0 Tx Power Sensor

       

      Is this some known bug, or.. ?


      Signed,
      Confused in Seattle 

      (Scott Fraley)

        • Re: Why are my Orion.Alerts StartTime and EndTime dates showing years 1899?
          mr.e

          I do not believe this is a bug.  I think the SW developers put that date intentionally since the field cannot be empty.  So, by default, the date is set far in the past.  For example,if you query the Nodes table, the Unmanaged Until columns show '12/30/1899 5:00AM.  Also, the Accounts table, you'll see that accounts are set to expire by default on 1/1/2100.  In your case, I'd add a filter that excludes the year 1899.

           

          I hope this helps.

          1 of 1 people found this helpful
            • Re: Why are my Orion.Alerts StartTime and EndTime dates showing years 1899?
              scottfraley

              Hmmmm, well, I've tried that, sort of, by doing a query for anything AFTER.. well, here's my latest query;

               

              SELECT TOP 100 Name, Enabled, Description, StartTime, EndTime, DOW, NetObjects, Trigger, Reset, Sustained, LogFile, LogMessage FROM Orion.Alerts WHERE StartTime >= '1899-12-30T17:00:00Z' ORDER BY StartTime ASC

               

              And my results were;

               

              <Response xmlns="https://lsdorion/SolarWinds/InformationService/v3/Json/Query">

                 <results/>

              </Response>

               

              Am I querying the correct table [far as you know] ?  Because if so, I've got a pretty serious problem.  I know there are alerts that took place recently because again, I can see them on the Alerts page of the Orion front end.

               

              If I do the same query with no 'filter' / WHERE, I get 16 records with those 1899 dates and that's it. [time passed] I went back to the 'docs' that I have and discovered the Orion.ActiveAlerts table. I queried it as well (the only 'limit' was 'TOP 100') and got ZERO records back. I must be talking to the wrong tables, or we're not configured correctly.

               

              At this point, my question is; can anyone point me to a document (or set of) that can explain to me which tables I get current alerts from, etc. ?  (The Orion SDK PDF does not cover this.)

               

               

              Thanks again,

              Scott F.

            • Re: Why are my Orion.Alerts StartTime and EndTime dates showing years 1899?
              ouberlord

              I agree with newkidd2; I think that is just used as a placeholder value in any place that requires a timestamp in the database that hasn't gotten "real" data yet.

              1 of 1 people found this helpful
              • Re: Why are my Orion.Alerts StartTime and EndTime dates showing years 1899?
                tdanner

                Orion.Alerts has information about the configuration of your alerts - the criteria to look for. Specifically Basic Alerts. In this context, StartTime and EndTime mean "this alert definition should be active between StartTime and EndTime". And yes, those 1899 dates are placeholders that just mean "any time". Orion.AlertDefinitions has the configuration for Advanced Alerts.

                 

                I think what you really want is the information about what alerts are currently active on your devices. This is in Orion.ActiveAlerts (for Basic Alerts) and Orion.AlertStatus (for Advanced Alerts).