cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Highlighted

Re: Node Details URL in custom SQL Report

Jump to solution
0 Kudos
Highlighted
Level 11

Re: Node Details URL in custom SQL Report

Jump to solution

Cool stuff njoylif

Here is what I used to show the notes on my nodes as a resource in summary page:

--------------------------------------------

SELECT CONCAT('<a href="https://thwack.solarwinds.com/Orion/View.aspx?NetObject=N:',a.nodeid,'">',b.caption,'</a>') as 'Caption',

a.Note,a.AccountID,a.TimeStamp

FROM NodeNotes a

INNER JOIN NodesData b on a.NodeID=b.NodeID

ORDER BY a.TimeStamp DESC

--------------------------------------------

Highlighted
Level 10

Re: Node Details URL in custom SQL Report

Jump to solution

Resurrecting an old topic.

I'm so close to getting this working with all the help found on here.

The results preview great!

Results work.jpg

But when adding the details link to the table I get this:

Ordinal.jpg

Any ideas?

0 Kudos
Highlighted
Level 12

Re: Node Details URL in custom SQL Report

Jump to solution

It looks like you enabled the Details Page URL on the Interface column.  This line is specific to NODES ONLY.

,'/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:'+CAST(Nodes.NodeID as varchar(256)) as 'DetailsURL'

You could replace it with this if your report is for Interfaces.

,'/Orion/NetPerfMon/NodeDetails.aspx?NetObject=I:'+CAST(Interfaces.InterfaceID as varchar(256)) as 'DetailsURL'

Should be noted that the "DetailsURL" can only be set to one element type.

Highlighted
Level 10

Re: Node Details URL in custom SQL Report

Jump to solution

This worked, exactly as expected.!

0 Kudos
Highlighted
Level 7

Re: Node Details URL in custom SQL Report

Jump to solution

Hi,

I also wanted to have hyperlink which direct to node details page, I tried it but did not worked for me.

Could you please tell me which element IP to use for node details.

Should be noted that the "DetailsURL" can only be set to one element type.

0 Kudos
Highlighted
Level 8

Re: Node Details URL in custom SQL Report

Jump to solution

Hi gunjan1402

If you are using a Custom SQL Query Report then you need to take care of the following :-

1.) Use Distinct while using the Select statment.

2.) for enabling the link to the nodes in the SQL report you need to add Details URL to your DataSource.

3.) For Adding the Details URL page you simple need to Add the following in the SQL Query in your Select Statement

     '/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:'+CAST([NodesData].[NodeID] AS varchar(256)) As DetailsURL

Note: Here you need to pick the NodeID from Nodes.Data Table.

Hope This Helps

Highlighted
Level 9

Re: Node Details URL in custom SQL Report

Jump to solution

I think that I'm very close, but I'm getting the following Error:  "Ordinal '7' exceeds the maximum number"

Any ideas?  BTW, I'm loving your post.

pastedImage_0.png

pastedImage_1.png

This is my sql:

SELECT  distinct

  swNodes.Caption as Name,

    Vendor,

    swNodes.Address_Locations,

interfaces.statusLED,

  InterfaceName,

  interfaces.caption as NodeName,

    '/Orion/NetPerfMon/NodeDetails.aspx?NetObject=I:'+CAST(interfaces.InterfaceID AS varchar(256)) As DetailsURL,

  Interfaces.InterfaceSpeed / 1000000 as "Interface Speed"

FROM [SolarWindsOrion].[dbo].[Interfaces]

join [SolarWindsOrion].[dbo].[Nodes] swNodes on [SolarWindsOrion].[dbo].[Interfaces].NodeID = swNodes.NodeId

 

  where

        (swNodes.Caption like 'AFGGA12%' or

        swNodes.Caption like 'AFGGA23%' or

        swNodes.Caption like 'AFGGA24%' or

        swNodes.Caption like 'AFGGA37%' or

        swNodes.Caption like 'AFGGA51%' or

        swNodes.Caption like 'AFGGA57%' )

        and (interfaces.Caption = 'GigabitEthernet0/0 · level 3 circuit'

         or interfaces.Caption = 'sp_wan'

         or interfaces.Caption = 'GigabitEthernet0/0 · Level 3 Circuit'

         or interfaces.Caption = 'GigabitEthernet0/2 · Level 3 Circuit')

           

Order by swnodes.Caption

0 Kudos
Highlighted
Level 12

Re: Node Details URL in custom SQL Report

Jump to solution

The query runs fine in my SQL Studio.  It was blank due to the WHERE clause, but even commenting those out, I get data back, no errors.  Does your work in Studio, but just not in report writer?

0 Kudos
Level 17

Re: Node Details URL in custom SQL Report

Jump to solution

johnnygeesw​, off top of my head, I want to say that has to do with some math...i.e., remove your /1000000 for interface speed and see if query works then.  after figuring out where issue is, you can then figure out how to fix the issue.

0 Kudos