Querying Solarwinds for Device Added Dates

We had the need to create a report that showed us which Windows devices were added into Solarwinds within the last 7 days. With a little poking around and chatting to someone that knows SQL this is what we came up with:

select n.caption as ‘Node Name’ , Min(datetime) as ‘Date Added’, n.vendor
from responsetime r join nodes n on n.nodeid = r.nodeid
where n.vendor = ‘windows’
Group by n.caption,n.vendor
Having Min(datetime) >= getdate() – 7

Things you can change:
Vendor – this can be changed to match any vendor name you have in your node list and will return those nodes
Getdate – The sum after + on the last line can be changed to get the results back which you require

Hope this helps.

(Source for the main part of the SQL: http://thwack.solarwinds.com/thread/39350)


No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: