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

Custom Search View

Hello,

I am looking for a way to change the default search output table. Is this possible? I know it is similar to Manage Nodes view, however this view is not available for 'standard' users.

2015_08_21_14_38_34_Orion_Summary_Home.png

2015_08_21_14_39_10_Node_Search_Results.png

0 Kudos
14 Replies

Re: Custom Search View

pe7rk

You could add a SWQL custom query resource to the page, and then add the following query:

SELECT

n.Caption AS NODE, 

'/Orion/images/StatusIcons/small-' + ToString(n.StatusIcon) AS [_IconFor_NODE], 

'/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + ToString(n.NodeID) AS [_LinkFor_NODE],

n.ObjectSubType,

n.StatusDescription,

n.IPAddress

FROM Orion.Nodes n

--YOU ONLY NEED TO ADD THE LINES BELOW TO THE "ENABLE SEARCH" PART OF THE CUSTOM QUERY SWQL RESOURCE

where

NODE LIKE '%${SEARCH_STRING}%'

OR

n.ObjectSubType LIKE '%${SEARCH_STRING}%'

OR

n.StatusDescription LIKE '%${SEARCH_STRING}%'

OR

n.IPAddress LIKE '%${SEARCH_STRING}%'

I grabbed lines 2, 3, & 4 from alexslv‌'s post The Magic of SWQL: Create "All Components With Problems" Resource With Clickable Links, Status Icons...

I hope this is what you were meaning, and I hope it helps.

Thank you,

-Will

0 Kudos
Highlighted

Re: Custom Search View

pe7rk

The SWQL query above, should produce a searchable node resource that looks like this:

npm_swql_custom_query_search_nodes-001.PNG

As the SWQL query is above, you should be able to search through all columns.

If you do not want to be able to search by a specific column, simply remove that column from the where/search part of the query.

-Will

0 Kudos
Highlighted
Level 11

Re: Custom Search View

This query is not working in NMP 12, please provide the query that will work

0 Kudos
Highlighted
Level 11

Re: Custom Search View

unable to search, getting error"Error: A query to the SolarWinds Information Service failed."

0 Kudos
Highlighted

Re: Custom Search View

nafees.khan​ It appears to still be working for me. From the error message you are getting, I would say there would be something wrong with the way you have the query entered. Perhaps you can simplify the query, and see if it works any better?

I would make sure the basic part of the query works first, just to make sure there is not a fundamental issue with your environment.

SELECT 

n.Caption AS NODE

,n.ObjectSubType

,n.StatusDescription

,n.IPAddress

FROM Orion.Nodes n

If that works, then I would add the search criteria next, and test it again.

SELECT 

n.Caption AS Node

,n.ObjectSubType

,n.StatusDescription

,n.IPAddress

FROM Orion.Nodes n

WHERE

n.Caption LIKE '%${SEARCH_STRING}%'

If the search works, then I would continue adding the other fields to the search criteria. (if needed)

Other than that, since this is just a basic SWQL query, it should be backwards compatible throughout different versions... as far as I am aware...

Thank you,

-Will

0 Kudos
Highlighted
Level 11

Re: Custom Search View

This query is working but post entering below links I am getting "Error: A query to the SolarWinds Information Service failed."

'/Orion/images/StatusIcons/small-' + ToString(n.StatusIcon) AS [_IconFor_NODE],   

'/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + ToString(n.NodeID) AS [_LinkFor_NODE],

Without above lines I am getting the search result as plain text, node is not clickable so that I can click on node and get directed to the node

0 Kudos
Highlighted
Level 11

Re: Custom Search View

Thanks

I sorted out, it's working.

0 Kudos
Highlighted

Re: Custom Search View

nafees.khan​ I'm glad you figured it out, and got it working. If you don't mind me asking, what did you discover to be causing the issue(s)? I am only asking in hopes of assisting the the next person to come along, possibly having a similar issue.

Thank you,

-Will

0 Kudos
Highlighted
Level 11

Re: Custom Search View

You mentioned that only below lines should be added below enable search, but it was not working in my environment

pastedImage_4.png

Post entering the entire query below enable search, it started working, below is the working snap

pastedImage_5.png