I'm not sure if there is a more direct way to do this but after countless hours trying to reverse engineer widgets put in place by engineers no longer with the business, I've found that you can find the widget type used on a dashboard/view using either the resource ID, or view ID depending on your needs in SQL or SWQL
When would this be useful? When you put a widget/resource on a dashboard and edit the name there really isn't anything to indicate what the original widget/resource used was. You either have to know based on the available options in the edit window, or hunt through the various resources available until you find the right one, or something comparable. I have run into this COUNTELSS times in my inherited environment, and each time it is a time sink to try and re-create/replicate widgets across the environment based on business needs.
-------------
How to:
Resource ID: To get the resource ID, I've found it easiest to click the edit button on the widget in question, and then find the "ResourceID" at the end of the url string (ex: solarwinds website/Orion/APM/Resources/EditTopXX.aspx?ResourceID=9964)
View ID: Similar to above, the view ID would just be the at the end of the view/dashboard you're working on (ex: solarwinds website/Orion/SummaryView.aspx?ViewID=728)
-------------
Scripts:
SWQL:
- By ResourceID: Displays relevant data to the individual resource
SELECT TOP 1000 ResourceID, ViewID, ViewColumn, Position, ResourceName, ResourceFile, ResourceTitle, ResourceSubTitle
FROM Orion.Resources
where resourceid = 1234 --Swap out the Resource ID
- By ViewID: Displays all resources on the view, their resource name, and the title in use
SELECT TOP 1000 ResourceID, ViewID, ViewColumn, Position, ResourceName, ResourceFile, ResourceTitle, ResourceSubTitle
FROM Orion.Resources
where viewid = 1234 --Swap out the View ID
-------------
SQL: (Note your DB tables prefixes might be named differently, but it should reside in the Resources table)
- By ResourceID:
Select * from dbo.Resources where resourceid = '1234'--Swap out the Resource ID
- By ViewID:
select * from dbo.resources where viewid = '1234'--Swap out the View ID
-------------
Output:
The Resource Name in the output is the name of the widget which you can then search for in the Add Widget menu for your view.
-------------
As mentioned above, there may be an easier/more direct way to do this, however I've spent way more time than I'd like to admit over the years reverse engineering existing customized widgets. It wasn't until today that I realized I could likely validate this information in the database. Hopefully this helps others out there!
If you have a more direct solution, please feel free to share it below!