I’ve poked around a bit and I can’t find how to do what I’m wanting here. (Thus the post)
Here’s the setup: (And Yes the utility power is flaky enough to need this)
ø I have various APC NetBotz devices with unfiltered (Non-UPS) power run into an ice-cube relay which then runs into External1 as a dry contact
ø I’ve got the discrete status and label pulled back using custom pollers
ø These are grouped with custom property fields to break out what power grid these are on.
The pollers are done and trucking along. All’s well on that front.
What I’d like to do is set an alert that sends out a status of all field units when any of them trip. The alert trigger seems fairly easy, just use the poller Powerdiscrete as the trigger (0=fail, 1=good), and limit with the field name. The trigger and reset message… That seems to be the rub…
I’d like to set the message so it shoots a status somewhat like this: (I’m using an existing “SubSite” Property since it’s unused for these devices, I realize the use doesn’t match the property title well)
Node: SubSite: Status:
Tower1 North Grid Power Good
Tower2 East Grid Power Fail
Tower3 South Grid Power Good
Tower4 West Grid Power Good
Essentially one consolidated report that shows all the grid monitors in one alert message. That makes it easier for the electrical group to see what power legs are down and out, or if this is a utility outage upstream.
I have had some success using a custom report, but the problem is that you can only pull historical reports for Custom pollers. I can’t get the last/current state of the poller on each node for formatting the above. That puts me in the position that either I get multiple entries per node, or it’s occasionally missing node data from the report.
If it’s of any assistance, the report I cobbled together is below. (PowerLabel is the custom poller text for the discrete label, i.e. Power Good, Power Bad) I’m not that good with SQL to begin with, and I don’t really know Orion’s DB structure, so I don’t know if this is something that could be done via SQL.
Any direction or assistance would be welcome.
SELECT TOP 10000 Nodes.Caption AS NodeName,
Nodes.SubSite AS SubSite,
CustomNodePollerStatistics_CustomPollerStatistics.Status AS Status,
Nodes.NodeID AS NodeID,
DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), GETDATE()) , CustomNodePollerStatistics_CustomPollerStatistics.DateTime) AS DateTime
FROM
((Nodes INNER JOIN CustomPollerAssignment CustomNodePollerAssignment_CustomPollerAssignment ON (Nodes.NodeID = CustomNodePollerAssignment_CustomPollerAssignment.NodeID)) INNER JOIN CustomPollerStatistics CustomNodePollerStatistics_CustomPollerStatistics ON (CustomNodePollerAssignment_CustomPollerAssignment.CustomPollerAssignmentID = CustomNodePollerStatistics_CustomPollerStatistics.CustomPollerAssignmentID)) INNER JOIN CustomPollers CustomNodePollers_CustomPollers ON (CustomNodePollerAssignment_CustomPollerAssignment.CustomPollerID = CustomNodePollers_CustomPollers.CustomPollerID)
WHERE
( DATEADD(hh, DATEDIFF(hh, GETUTCDATE(), GETDATE()) , DateTime) BETWEEN 40817.8259490741 AND 40817.8333333333 )
AND
(
(CustomNodePollers_CustomPollers.UniqueName = 'PowerLabel')
)
AND
(
(CustomNodePollerAssignment_CustomPollerAssignment.InterfaceID = 0)
)