This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Modern Dashboard - Active Alerts Acknowledgement

Hi,

Under the acknowledgeit column I want it to go to the active alert of the specific node that is being clicked on so it can be acknowledged.

So this URL servername/.../ActiveAlertDetails.aspx example

instead of this URL  server/.../Alerts.aspx

any help would be appreciated thanks

SELECT DISTINCT
AlertObjects.EntityDetailsURL,
Nodes.Caption AS NodeName,
Nodes.Status as NodeStatus,
Nodes.DetailsURL,
'/Orion/Netperfmon/AckAlert.aspx?AlertDefID='+tostring(AlertObjects.AlertObjectID) AS AcknowledgeIt,
'Acknowledge' As AckLabel,
AlertActive.AlertActiveID, AlertObjects.AlertObjectID, AlertConfigurations.Name, AlertConfigurations.Severity, AlertConfigurations.ObjectType,
AlertObjects.EntityUri, AlertObjects.EntityType, AlertObjects.EntityCaption,
ToLocal(AlertActive.TriggeredDateTime) AS TriggeredDateTime, AlertObjects.LastTriggeredDateTime, AlertActive.TriggeredMessage AS Message,
AlertActive.AcknowledgedDateTime, AlertActive.Acknowledged AS Acknowledged, AlertActive.AcknowledgedBy, AlertActive.AcknowledgedNote,
Case
When Floor((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) + 0.0)/86400)>0 Then
ToString(ToString(Floor((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) +0.0)/86400))+'d '+
ToString(Floor(((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) - 86400*(Floor((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) + 0.0)/86400))) + 0.0)/3600))+'h '+
ToString(Floor(((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) - 3600*(Floor((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) + 0.0)/3600))) + 0.0)/60))+'m ')
When Floor(((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) - 86400*(Floor((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) + 0.0)/86400))) + 0.0)/3600)>0 Then
ToString(ToString(Floor(((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) - 86400*(Floor((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) + 0.0)/86400))) + 0.0)/3600))+'h '+
ToString(Floor(((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) - 3600*(Floor((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) + 0.0)/3600))) + 0.0)/60))+'m ')
When Floor(((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) - 3600*(Floor((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) + 0.0)/3600))) + 0.0)/60)>0 Then
ToString(ToString(Floor(((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) - 3600*(Floor((SecondDiff(AlertActive.TriggeredDateTime,GetUtcDate()) + 0.0)/3600))) + 0.0)/60))+'m ')
Else ''
End AS ActiveTime
FROM Orion.AlertObjects (nolock=true) AlertObjects
INNER JOIN Orion.AlertActive (nolock=true) AlertActive ON AlertObjects.AlertObjectID=AlertActive.AlertObjectID
INNER JOIN Orion.AlertConfigurations (nolock=true) AlertConfigurations ON AlertConfigurations.AlertID=AlertObjects.AlertID
INNER JOIN Orion.NodesCustomProperties (nolock=true) NodeCP ON AlertObjects.RelatedNodeID = NodeCP.NodeID
INNER JOIN Orion.Nodes (nolock=true) Nodes ON AlertObjects.RelatedNodeID = Nodes.NodeID
where Nodes.Caption like '%device%'
Order By AlertConfigurations.Name, AlertObjects.EntityCaption

Parents
  • ok I have fixed it by amending a part of the code to 

    '/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:'+tostring(AlertObjects.AlertObjectID) AS AcknowledgeIt,
    Issue I have now is can the alerts be removed after x amount of days once acknowledged?
  • There is an AcknowledgedDateTime in the Orion.AlertActive SWQL table. You could try modifying your WHERE clause to only show alerts where the difference between AlertActive.AcknowledgedDateTime and the current UTC time is < 7 days? Not sure if you need < or <= so test it out.

    WHERE DAYDIFF(AlertActive.AcknowledgedDateTime, GETUTCDATE() ) <= 7

    If you mean removed from the system completely, you could probably find a way to clear out the alert but if the trigger condition still exists then the alert will retrigger immediately anyway.

  • Just removed from the report. Ok thanks will give that a try.

Reply Children
No Data