1 of 1 people found this helpful
You could set up a report to read the traps, from the Traps database table.
First use some SQL to first find the trap types you want:
SELECT TOP (250)[DateTime]
WHERE Hostname LIKE '<enter trap origin hostname/IP here>' --In my table we have a mix of IPs and hostnames, you may need to try both
Once you have identified the TrapType, which has a name format of the MIB it originated from (guessing your might look like Control-M-MIB:something-something) and the trap type from within it you can filter for just those traps and get a count.
This SQL could be used in a report to show a table of the number of traps received by each host, in the past day.
SELECT Hostname, COUNT(NodeID) AS Trap_Count
WHERE TrapType LIKE '<trap type you identified in 1st step here>'
AND DATETIME >= DATEADD(day,-1, getdate()) -- limits the result to last 1 of traps, or remove this to get all time history
GROUP BY Hostname
ORDER BY COUNT(NodeID) DESC
You could also re-add AND Hostname LIKE '<enter trap origin hostname/IP here>' to show the trap count from a single host.
Now you know the TrapType to filter upon, the trap varbinds (the info within the trap) are held in separate table (TrapVarBinds) so you'll need to join the tables together.
This query below will show this data, you will have to examine the traps RawValues column to see if the data you want is in there:
SELECT TOP 250 t.DateTime, t.IPAddress, t.Hostname, tv.RawValue, tv.OIDName, tv.OIDvalue, tv.OID, t.TrapType
FROM SolarWinds.dbo.Traps t
INNER JOIN SolarWinds.dbo.TrapVarbinds tv ON t.TrapID = tv.TrapId
WHERE t.IPAddress LIKE '<trap source IP here>'
AND t.TrapType LIKE '<trap type you identified in 1st step here>'
ORDER BY t.DateTime DESC
You can now start building the SQL query with IPaddress, TrapType and the text string you want from tv.RawValue into your report.
I hope it helps