1 Reply Latest reply on Aug 2, 2012 7:11 AM by vhcato

    Trap Reports?

    wifig0d

      Is there a way to create reports based on Traps? Basically, I would like to get different UPS reports based on certain Traps like "Self-Test Failure", "Faulty Battery", etc. Is this something I'm just going to have to write a Custom SQL report and pull my data via SQL?

        • Re: Trap Reports?
          vhcato

          We handle our APC UPS traps via Custom SQL reports. Below is an example query to show which devices have sent traps within the last 24 hours with battery-related issues. Not sure what brand of UPS you are using, so I don't know if these are the correct variables in the WHERE clause, but you get the idea. You will likely want to go into "Field Formatting" and hide "NodeID". We include it so that we can have the node name displayed as a link to the node details view.

           

          SELECT DISTINCT Caption, Traps.NodeID, OIDValue AS Message, COUNT (OIDValue) AS Count

          FROM Nodes, Traps, TrapVarbinds

          WHERE
          Traps.TrapID=TrapVarbinds.TrapID AND
          Nodes.NodeID=Traps.NodeID AND
          (DATEDIFF (Hour, DateTime, getdate()) <= 24) AND
          OIDName='mtrapargsString' AND
          (OIDValue LIKE '%Batter%') AND
          (OIDValue NOT LIKE '%utility power%') AND
          (OIDValue NOT LIKE '%battery power%')

          GROUP BY Caption, OIDValue, Traps.NodeID

          ORDER BY Caption