With the recent issues with Orion, I only have access to the database. I need to create a sql query to report each of my nodes, the total time they were monitored in 2020, and the uptime for the same period. For example:
Node Total Avail Total Uptime
Server1 8760 8672
Server2 ...... ........
From there, I can do the rest manually. A simple query that I can export to csv will do the trick, but since I don't know the database structure, I'm having issues.
A little assistance please?
Within the database itself, you'll find a table called "ReportDefinitions"
In that table is the title of all of yout reports, along with the column "Definition". In that field is the XML information that defines the report. Scan it for the second that starts <a:CommandText>. It'll look like this:
Nodes.Caption AS NodeName,
Nodes.DetailsUrl AS NDetailsUrl,
Nodes.VendorIcon AS Vendor,
Interfaces.Caption AS Interface_Caption,
Interfaces.InterfaceIcon AS Interface_Icon,
Interfaces.DetailsUrl AS IDetailsUrl,
INNER JOIN Orion.NPM.Interfaces ON Nodes.NodeID = Interfaces.NodeID
INNER JOIN (
(SELECT MAX(InAverageBps) as maxInAverageBps FROM (
SELECT TOP 90 PERCENT InAveragebps
FROM Orion.NPM.InterfaceTraffic WHERE InterfaceID = OuterInterfaceTraffic.InterfaceID AND DateTime >= AddDay(-7,
(and so on...)
that's your report. It is (as should be obvious) a SQL query that you can use straight in SQL Management Studio or a similar tool.
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.