Network Change & Configuration Management

Reply

How do I delete devices from NetMRI where Last Seen is greater than 30 days

TChristian
Techie
Posts: 9
2152     0

In NetMRI Network / Explorer / Discovery I have over 23000 IP Addresses that are unknown and Last Seen is over 30 days old. Been looking throught the API's but didn't find anything to reference DeviceLastSeen.

Does anyone have a perl script to clean up these old IP Addresses?

 

Thanks

Re: How do I delete devices from NetMRI where Last Seen is greater than 30 days

Expert
Posts: 257
2153     0

I have several thoughts on this...

First, you might be able to use the "SPM Devices Present" function from the API which lets you specify start and end times. You'd have to compare the device name to "Unknown".  Get the DeviceID and delete it.  By default the function limits the size of the returned array to 1000 entries so you'd have to call it many times.

 

If you're not set on using Perl, just use Discovery.  Select the device group of "UNKNOWN".  Then sort by the "Last Seen" column.  Depending on your criteria, you could define a Filter that matches on Last Seen "contains" or "doesn't contain" as a crude selector to winnow the results.  Then select all rows and Delete them (trash can icon).  (Hopefully you have the advanced value of Minimum Rows set much larger than 10!)

 

Lastly, I'm wondering why you have 23000 unknowns.  Are your Discovery CIDR ranges too broad?  If you cull those down to exclude the ranges for most of the unknowns, those entries will be auto-deleted.  And they won't return.  So NetMRI won't be wasting resources attempting to SNMP poll them or otherwise discover them.

Re: How do I delete devices from NetMRI where Last Seen is greater than 30 days

TChristian
Techie
Posts: 9
2153     0

I was looking at SPD Devices Present too, but I was focusing on finding a variable like Last Seen to use.
That said I will run this API to see the results.
I too have been wondering why I have so many unnknowns that are very old. Yeah, some of my CIDRs are very large indeed. I'll work on cutting them down to smaller ranges. Guess this might be causing my MRI to run slow too.

Showing results for 
Search instead for 
Do you mean 

Recommended for You