To configure alerts on traps by comparing the any value in the trap details??? If so, then how????
Use a custom SQL alert on the node and some SQL like this:
WHERE NODEID IN ( select NODEID from traps
INNER JOIN trapvarbinds tv
ON traps.trapid = tv.trapid
WHERE traps.traptype = 'BGP4-MIB:bgpTraps.0.2'
and traps.DateTime < dateadd(hour,-1,getdate())
AND acknowledged = 0
AND tv.oid LIKE '1.3.6.1.2.1.15.3.1.2.%'
AND tv.oidvalue = 'idle(1)'
)
this looks for a specific trap type on the node, and specific values in the trapvarbinds.
Richard
i dont know how i do this can you plz tell me the way how sql alert for trap will be configured??
start here: Video Tutorial: Orion Advanced Alerts - Videos | SolarWinds
This tutorial is about Advance alerts not covering the portion of trap alert configuration. Kindly tell some other solution. I'll be very thankful to you.
Wow. Never thought to use Custom SQL in Advanced Alerts. Thanks for the Trap code. Do you have a similar Where clause for Syslog?
-=Dan=-
here you go -- if a node reports that it cannot reach its NTP server more than a ten times in the past hour...
WHERE nodeid IN (SELECT nodeid
FROM (SELECT Count(*) errcount,
nodeid
FROM syslog
WHERE syslogseverity = 3
AND datetime < Dateadd(hour, -1, Getdate())
AND message LIKE '%NTP Server Unreachable'
GROUP BY nodeid
HAVING Count(*) > 10) T)
or, more simply if any node reports not reaching its NTP server in the past hour
AND message LIKE '%NTP Server Unreachable')
/RjL
p.s. http://www.dpriver.com/pp/sqlformat.htm is a nice SQL reformatter
Awesome. Thanks. A lot simpler without the joins. Getting Universal pollers is just plain UGLY.
Sure pays to get SQL proficient if you want to fully utilize NPM.
Is there a good source for learning subqueries, complex aggregation , use of temp tables, etc?
Thanks for sharing.
Hi Richard
Could you help me with a similar case: http://thwack.solarwinds.com/thread/59316
Thanks,
Simon