Here it is in SWQL -- That's from some other post but I can't remember which one. I use it as a resource on one of my pages, you can put it in as a report as well using SWQL.
SELECT N.Caption, N.IP_Address, N.UnManageFrom AS [From], N.UnManageUntil AS [Until], AE.AccountID AS [By], DayDiff(GetUtcDate(), N.UnmanageUntil) AS [Days Left]
FROM Orion.Nodes N JOIN Orion.AuditingEvents AE ON (AE.NetObjectID = N.NodeID)
WHERE N.UnManaged = 1 AND (AE.AuditEventID = (SELECT TOP 1 AE2.AuditEventID FROM Orion.AuditingEvents AE2 WHERE AE2.NetObjectID = N.NodeID ORDER BY AE2.TimeLoggedUtc DESC))
ORDER BY N.Caption
Use the web based report manager, create a new report, choose custom query. Edit the custom query resource and paste the code into
Then click submit and go through the rest of the add report wizard.
Hello dear parsaie,
The above code worked for me , could u pls let me know what changes do i need to make in the resource code to pull report for only last 3 months(90days) and only for servers(device specific)...code which you mentioned above i am getting only network devices/nodes....
This should do the trick. Either run it against your db, or open Report Writer and select advance sql and paste it in there.
Where Unmanaged like '1'
Open the Solarwinds database manager and run that query from there.
From the NPM server navigate to Start > All Programs > SolarwindsOrion > Advanced Features > Database Manager
This will open the Database Manager. Once it's opened
Click on Add Default Server
Expand the database, then expand the Solarwinds database.
Once it's expanded and you see all of your tables right click over any table and Select Query Table
Delete the contents inside of the box
Paste the query I sent over and select Execute Query. This will give you information you are looking for.
If you want to make this more of a formal process, then I suggest using report writer to save the report.
Run the query below. This should give you the report. If it's still not giving you the correct output can you show a pic of your results? I'm interested on seeing what's to the right of node name.
Where unmanaged like '1'
I've been thinking about listing the current unmanaged nodes over the past 60 days. This is what I came up with, I imagine we could tie the current unmanaged nodes to the query below to provide more information.
This query shows you the nodes that went into unmanaged over the last 60 days, it's built around events. So if the device went back into management, the node will still show on this list.
INNER Join Events
ON Nodes.NodeID = Events.NetObjectID
Where Events.EventType like '40' AND
Order by EventTime
Query is not working getting Error..attaching screenshot.
---> pls let me know the resource code for below to pull web based report
1) how to pull the report only for servers
2) over all inventory report
My query is sql based, I don't know if web based reporting handles sql. For the query I posted you would have to create the report via Report Writer using Advanced Sql. Then link the report to one of your webpages.
i had executed query through report writer --advanced sql , i am getting report blank
we have some un-managed devices and we are using same sql DB.
---> can u give me code to pull list of all inventory in the network
Are you running 11.5.2, and are you familiar with Database Manager?
This should render results on 11.5.2 and earlier versions.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 150,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process. Learn more today by joining now.