This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Importing DetailsUrl as a Details Page Link with Tooltip into a Custom Table

This can be easily accomplished as long as the field is named DetailsUrl within the query. In the following example the DetailsUrl is actually named EntityDetailsUrl and will not allow the selection of a Details Page Link. 

This query returns all unacknowledged alerts. I was able to reference the Node DetailsURL by creating a JOIN to the node table from the AlertObjects table using the RelatedNodeCaption and this allowed the Detail Page Link to be displayed. Does anyone have an idea of how to include the EntityDetailsUrl. 

SELECT DISTINCT Node.Caption AS Node, Node.DetailsUrl AS NodeDetails, AlertObjects.EntityCaption AS Entity, AlertObjects.EntityDetailsUrl AS EntityDetails, AlertConfigurations.Name AS ALERT, AlertActive.TriggeredMessage AS Message
FROM Orion.AlertObjects AlertObjects
JOIN Orion.AlertActive AlertActive ON AlertObjects.AlertObjectID=AlertActive.AlertObjectID
JOIN Orion.AlertConfigurations AlertConfigurations ON AlertConfigurations.AlertID=AlertObjects.AlertID
JOIN Orion.Nodes Node ON Node.Caption=AlertObjects.RelatedNodeCaption
WHERE (AlertActive.Acknowledged is Null OR AlertActive.Acknowledged = 'False')
This Datasource allowed the Node to be displayed with the Details Page Link
I was able to get the entity displayed this way for interfaces by creating a JOIN to the Interface table on the EntityDetailsUrl, however this filtered the query to only display alerts where the entity is an interface. 
SELECT DISTINCT Node.Caption AS Node, Node.DetailsUrl AS NodeDetails, Interfaces.Caption AS Interface, Interfaces.DetailsUrl AS InterfaceDetails, AlertConfigurations.Name AS ALERT, AlertActive.TriggeredMessage AS Message FROM Orion.AlertObjects AlertObjects
JOIN Orion.AlertActive AlertActive ON AlertObjects.AlertObjectID=AlertActive.AlertObjectID  
JOIN Orion.AlertConfigurations AlertConfigurations ON AlertConfigurations.AlertID=AlertObjects.AlertID
JOIN Orion.Nodes Node ON Node.Caption=AlertObjects.RelatedNodeCaption
JOIN Orion.NPM.Interfaces Interfaces ON Interfaces.DetailsUrl = AlertObjects.EntityDetailsUrl
WHERE (AlertActive.Acknowledged is Null OR AlertActive.Acknowledged = 'False')
Any ideas????
Parents
  • Do you want this as a "Report" because that's how you are building it or as a custom SWQL query widget on a page?

  • This is being built as a custom table widget for use in a view, however same principle would apply if creating a table for a report. 

  • That's correct, but for a custom widget, you can use the _LinkFor_<FieldName> alias to automatically show the links you want to use, and they honor it.  This is a very simple example:

    SELECT [I].Node.Caption AS [Node Name]
         , [I].Node.DetailsUrl AS [_LinkFor_Node Name]
         , '/Orion/StatusIcon.ashx?entity=Orion.Nodes&status=' + Replace(ToString([I].Node.Status), ' ', '') + '&size=small' AS [_IconFor_Node Name]
         , [I].Caption AS [Interface Name]
         , '/Orion/StatusIcon.ashx?entity=Orion.NPM.Interfaces&status=' + Replace(ToString([I].Status), ' ', '') + '&size=small' AS [_IconFor_Interface Name]
         , [I].DetailsUrl AS [_LinkFor_Interface Name]
    FROM Orion.NPM.Interfaces AS [I]
    WHERE [I].InBandwidth <> 0
     AND  [I].OutBandwidth <> 0
    ORDER BY [I].Node.Caption, [I].Index

    There are more details about syntax like this in SolarWinds Lab #91.

Reply
  • That's correct, but for a custom widget, you can use the _LinkFor_<FieldName> alias to automatically show the links you want to use, and they honor it.  This is a very simple example:

    SELECT [I].Node.Caption AS [Node Name]
         , [I].Node.DetailsUrl AS [_LinkFor_Node Name]
         , '/Orion/StatusIcon.ashx?entity=Orion.Nodes&status=' + Replace(ToString([I].Node.Status), ' ', '') + '&size=small' AS [_IconFor_Node Name]
         , [I].Caption AS [Interface Name]
         , '/Orion/StatusIcon.ashx?entity=Orion.NPM.Interfaces&status=' + Replace(ToString([I].Status), ' ', '') + '&size=small' AS [_IconFor_Interface Name]
         , [I].DetailsUrl AS [_LinkFor_Interface Name]
    FROM Orion.NPM.Interfaces AS [I]
    WHERE [I].InBandwidth <> 0
     AND  [I].OutBandwidth <> 0
    ORDER BY [I].Node.Caption, [I].Index

    There are more details about syntax like this in SolarWinds Lab #91.

Children