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.
pe7rk
You could add a SWQL custom query resource to the page, and then add the following query:
SELECTn.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.IPAddressFROM Orion.Nodes n--YOU ONLY NEED TO ADD THE LINES BELOW TO THE "ENABLE SEARCH" PART OF THE CUSTOM QUERY SWQL RESOURCEwhereNODE LIKE '%${SEARCH_STRING}%'ORn.ObjectSubType LIKE '%${SEARCH_STRING}%'ORn.StatusDescription LIKE '%${SEARCH_STRING}%'ORn.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 and Even Hovers As …
I hope this is what you were meaning, and I hope it helps.
Thank you,
-Will
The SWQL query above, should produce a searchable node resource that looks like this:
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.
Thats awesome! Thank you very much!
No worries. I'm happy to help, when I can.
If you have found this to be an acceptable resolution to your question, please mark this post as "Answered" to assist others for future reference.
This query is not working in NMP 12, please provide the query that will work
unable to search, getting error"Error: A query to the SolarWinds Information Service failed."
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.IPAddressFROM 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.IPAddressFROM Orion.Nodes nWHEREn.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...
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
Thanks
I sorted out, it's working.
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.
You mentioned that only below lines should be added below enable search, but it was not working in my environment
Post entering the entire query below enable search, it started working, below is the working snap
nafees.khan Ah, I see now... Yeah, now that I re-read my description, I can definitely see how it would read as "only including the lines below"... I should have probably posted the original response with the query, and search query values separated. Sorry about that, but I'm glad you got it figured out.
Another little trick, if you do not want to see all of the nodes to begin with, you can do the following:
In the main query box, set the WHERE value as something that will never be true. This will make the results box simply start as a blank resource, as it will never find any nodes that match.
SELECTn.Caption AS Node,n.ObjectSubType,n.StatusDescription,n.IPAddressFROM Orion.Nodes nWHEREn.Caption = 'set me as something that will never be true'
Then, in the "Enable Search" box, set the WHERE value as the variable value, which will only be true when you are searching. This will temporarily override the "always false" value you set above, and should show results for everything that matches your filter/search.
SELECTn.Caption AS Node,n.ObjectSubType,n.StatusDescription,n.IPAddressFROM Orion.Nodes nWHEREn.Caption LIKE '%${SEARCH_STRING}%'
Once you clear your search value, your resource will go back to a blank resource, only showing the column titles, and search box.
I like to do this to save on space, as I do not usually need to see everything before I do my search.
Sorry about the confusion in my previous wording.