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.

status LED in a custom report

BACKGROUND: I'm trying to craft a view for our operations folks and provide them with an overall status of unmanaged "elements"  One view I'm trying to create is one that shows unmanaged network interfaces that have not been unmanaged at the node level.  This can be achieved by looking at the Unmanaged binary field in the interfaces table and ensuring the unmanagedfrom or unmanageduntil fields are NOT NULL.

WHAT I'VE TRIED: I have created a custom table resource that does the above but also grabs the statusLED GIF that is associated with the object but I can't get it to actually display the gif on the web.  I've tried different options in the table layout for the GIF columns like "Event Icon" but they don't seem to process

Untitled.png

QUESTION: Does anyone know how to display the GIF that is associated with an element's STATUS in a custom table resource?

  • I was able to achieve this not by using the icon settings in the table column settings but by grabbing whatever "statusled" is and building that into the location on the server and inserting that into an html image tag in the SQL used for the table.  Then you simply turn on "Allow HTML tags" for the column.  Works like a charm

    An example of what I'm talking about:

    ('<img src="'+'https://orion_server/Orion/Images/StatusIcons/'+Interfaces.Statusled+'" width="16" height="16">','<a href="' + 'https://orion_server/Orion/Interfaces/InterfaceDetails.aspx?NetObject=I:' + CAST(Interfaces.InterfaceID as varchar(256)) + '">' + Interfaces.Caption + '</a>') as Interface

  • HI ryan.davis26​,

    i am trying to learn this. how do i read up more how this works ?

    thanks,

  • danbran​, unfortunately I haven't been able to find any documentation on this myself.  I started with a "Custom Table" resource and adding it to my view.  Then what I did was take the location of the images on the Orion web server (default I believe is /Orion/Images/StatusIcons/) and inserted that into an html image tag (<img>):

    '<img src="'+'https://orion_server/Orion/Images/StatusIcons/'+Nodes.Statusled+'" width="16" height="16">'

    (the above looks really ugly because you have to have the double quotes in there for the path to the icons on the orion server)

    You can make this either dynamic or static by simply pointing to the image directly or by grabbing the actual image from the

    Nodes.StatusLed field as I did in the example above.

    Then you enable HTML tags in the column settings of your datasource:

    pastedImage_0.png

    And really once you enable html tags for  a column it opens up a world of possibilities.  And because of that I pretty much never use the "Add Display Settings" drop down because it doesn't work very well AND the documentation on it is really lacking.  As you can see in the entire example I provided below, I'm not only adding StatusLED icons for nodes and interfaces but I'm also adding hyperlinks (<href>) to each node and interface.  What the below query shows are maintenance window time frames for "Node Level" maintenance and "Interface Level" maintenance.

    Select

    CONCAT('<img src="'+'https://orion_server/Orion/Images/StatusIcons/'+Nodes.Statusled+'" width="16" height="16">','<a href="' + 'https://orion_server/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:' + CAST(Nodes.NodeID as varchar(256)) + '">' + Nodes.Caption + ' - ' + Nodes.IP_Address + '</a>' + '<font color=orange>  - Node Level Only</font>') as Node

    ,Null Interface

    ,CONCAT(DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Nodes.UnManageFrom),' <b><font color=orange>TO</font></b><br> ',DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Nodes.UnManageUntil)) AS Maintenance

    From Nodes where  Nodes.Unmanaged   = 1


    Union

    Select

    CONCAT('<img src="'+'https://orion_server/Orion/Images/StatusIcons/'+Nodes.Statusled+'" width="16" height="16">','<a href="' + 'https://orion_server/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:' + CAST(Nodes.NodeID as varchar(256)) + '">' + Nodes.Caption + ' - ' + Nodes.IP_Address + '</a>' + '<font color=blue>  - Interface Level Only</font>') as Node

    ,CONCAT('<img src="'+'https://orion_server/Orion/Images/StatusIcons/'+Interfaces.Statusled+'" width="16" height="16">','<a href="' + 'https://orion_server/Orion/Interfaces/InterfaceDetails.aspx?NetObject=I:' + CAST(Interfaces.InterfaceID as varchar(256)) + '">' + Interfaces.Caption + '</a>') as Interface

    ,CONCAT(DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Interfaces.UnManageFrom),' <b><font color=orange>TO</font></b><br> ',DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Interfaces.UnManageUntil)) AS Maintenance

    From Interfaces join Nodes

    on Interfaces.NodeID = Nodes.NodeID

      Interfaces.UnManaged  = 1 and Nodes.Unmanaged !  = 1 and Assignment_Group='Network' and Interfaces.UnManageUntil is not null

    Here is what the final product looks like (with each node and interface hoverable and clickable):

    pastedImage_0.png

  • Appoligies for the delayed response, thank you for the awesome information one of the reason i love Solawinds always learning emoticons_happy.png

  • Hi Ryan

    this looks well explained, but i receive an error "* Query is not valid"

    i replaced the URL with our servername, any pointers for me?

    Kind regards

    Gert

  • Hi gert

    please paste your query here will take a look

  • Hi gert​, yes, it would be helpful to see what your query looks like; could be something really obvious as is the case with me almost ALL of the time, LOL emoticons_laugh.png

  • i used the exact same query, i only changed the URL to our server

    Select

    CONCAT('<img src="'+’https://server_name/Orion/Images/StatusIcons/'+Nodes.Statusled+'" width="16" height="16">','<a href="' +'https://server_name/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:' + CAST(Nodes.NodeID as varchar(256)) + '">' + Nodes.Caption + ' - ' +Nodes.IP_Address + '</a>' + '<font color=orange>  - Node Level Only</font>') as Node

    ,Null Interface

    ,CONCAT(DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Nodes.UnManageFrom),' <b><font color=orange>TO</font></b>

    ',DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Nodes.UnManageUntil)) AS Maintenance

    From Nodes where  Nodes.Unmanaged   = 1

    Union

    Select

    CONCAT('<img src="'+'https://server_name/Orion/Images/StatusIcons/'+Nodes.Statusled+'" width="16" height="16">','<a href="' +'https://server_name/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:' + CAST(Nodes.NodeID as varchar(256)) + '">' + Nodes.Caption + ' - ' +Nodes.IP_Address + '</a>' + '<font color=blue>  - Interface Level Only</font>') as Node

    ,CONCAT('<img src="'+'https://server_name/Orion/Images/StatusIcons/'+Interfaces.Statusled+'" width="16" height="16">','<a href="' +'https://server_name/Orion/Interfaces/InterfaceDetails.aspx?NetObject=I:' + CAST(Interfaces.InterfaceID as varchar(256)) + '">' + Interfaces.Caption +'</a>') as Interface

    ,CONCAT(DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Interfaces.UnManageFrom),' <b><font color=orange>TO</font></b>

    ',DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Interfaces.UnManageUntil)) AS Maintenance

    From Interfaces join Nodes

    on Interfaces.NodeID = Nodes.NodeID

      Interfaces.UnManaged  = 1 and Nodes.Unmanaged !  = 1 and Assignment_Group='Network' and Interfaces.UnManageUntil is not null

  • HI Gret,

    are you using SQL server 2008 by chance ? the CONCAT function was introduced in 2012 SQL server,

    you can use the following in SQL 2008.

    Select

    {fn CONCAT ()}

    something like this:

    Select

    {fn CONCAT('<img src="'+'/Orion/Images/StatusIcons/'+Nodes.Statusled+'" width="16" height="16">','<a href="' + '/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:' + CAST(Nodes.NodeID as varchar(256)) + '">' + Nodes.Caption + ' - ' + Nodes.IP_Address + '</a>' + '<font color=orange>  - Node Level Only</font>')} as Node

    ,Null Interface

    --,{fn CONCAT(DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Nodes.UnManageFrom),' <b><font color=orange>TO</font></b><br> ' + DateAdd(MINUTE,DATEDIFF(MINUTE,GETUTCDATE(),GETDATE()),Nodes.UnManageUntil))} AS Maintenance

    From Nodes where  Nodes.Unmanaged   = 1

    i have run into a slight hick up with the 4th line the Operand data type datetime is invalid for concat operator.