I have been trying to figure out how to create a report to show what nodes have been added to NPM in the past week. Has anyone done this before and if so, can they share their report? Any help is appreciated.
Wayne
Search Thwack for " New nodes addded report"
You can use [Events] as data source in your reports.
Or you can use audit events, but here you can use only Custom SQL as data source with this query.
SELECT data.* FROM AuditingEvents data
JOIN AuditingActionTypes types ON types.ActionTypeID = data.ActionTypeID
WHERE types.ActionType='Orion.NodeAdded' AND data.TimeLoggedUtc > ${FromTimeUTC}
You must be on newer code than I am. I don't see screens like what you posted. I'm on NPM 10.4.2 and using the Orion Report Writer. Trying to insert your script just gives me errors.
Here is what I have been able to use so far (it only gives what has been added that day) but I'm not sure how to make it a report for the last week. I am by no means a DBA.
select a.Caption, a.IP_Address, a.City, a.State, a.Priority, a.Primary_Contact,
from dbo.Nodes a, dbo.Events b
where a.NodeID = b.NetObjectID and
datepart(year, b.EventTime ) = datepart(year, GetDate()) and
datepart(month, b.EventTime) = datepart(month, GetDate()) and
datepart(day, b.EventTime) = datepart(day, GetDate()) and
b.EventType = 9
ok. after some digging I found a way to get the last 7 days but I don't know how it will work when it is the beginning of the month. here is what I have now.
datepart(day, b.EventTime) >= datepart(day,DATEADD(day,-7,GetDate())) and