cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
LCorp
Engaged Sweeper
Within a lot of my switches I have old “Last Seen” information. When I perform rescan, the old information is still there.

Sorry, new to posting here. haven't found out how to attach screen shot
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
Just an FYI for everyone: in the Lansweeper 6.0 beta, there is a button in the Asset Options of the switch page to manually delete any old connection data. If you are interested in a download link for the beta, please contact support@lansweeper.com and include "beta" in the title of your message.

View solution in original post

7 REPLIES 7
Susan_A
Lansweeper Alumni
Just an FYI for everyone: in the Lansweeper 6.0 beta, there is a button in the Asset Options of the switch page to manually delete any old connection data. If you are interested in a download link for the beta, please contact support@lansweeper.com and include "beta" in the title of your message.
Antax
Engaged Sweeper
I know this is an older post but I found it while looking for the same thing. So I took Jeffrey's advice and came up with this.

According to the lansweeperdb Database Schema document "This table (tblSNMPAssetMac) stores the MAC addresses of the assets connected to your switch interfaces/ports".

The query can be run from Configuration>Database Scripts in the Database Scripts window.

Remember to edit the @DeleteDate variable. As it is, the query will delete any record with a "LastSeen" date older than midnight of 2001-01-01 (YYYY-MM-DD). I figured if you just copied and pasted and forgot to change the date its less likely you delete anything you might need.

Disclaimer: I claim no responsibility for the actions or damage resulting from this query.

It may be wise to create a report to show the records that will be deleted before processing this query.

DECLARE @DeleteDate DateTime

SET @DeleteDate = '2001-01-01 00:00:00.000'

DELETE FROM tblSNMPAssetMac
WHERE LastSeen < @DeleteDate
Susan_A
Lansweeper Alumni
Keep in mind that no support is provided for writing custom database scripts and that any scripts are run at your own risk. This is why we wouldn't recommend this as a solution.

A cleanup option is on our customer wish list, but we don't have a release date for this feature. Not sure how development would want to implement this. In a way, it doesn't make sense to implement a cleanup option. Existing cleanup options were added to reduce the size of the database. Cleaning up the port data wouldn't necessarily lead to a reduction in database size however, as we don't keep a full connection history anyway. It's just the last port connection that's stored. It might be better to simply "gray out" connections not detected during the last switch scan.
LCorp
Engaged Sweeper
Thank you, I'll give it a try
sukaitsu
Champion Sweeper
LCorp,

I've asked for this in the past. This can be accomplished with a custom SQL script that returns all connected assets from the switch table with a Count(tblAssets.AssetName) > 1 And LastSeen on the switch date less than (whatever you specify). This would all be nested in an Delete statement, so you are clearing out the old entries. I know this is a very high level explanation, but its possible.

Thank you,

Jeffrey
Thank you, Jeffrey Smith Enterprise Applications Security (319) 499-6310 JefSmith@geico.com
LCorp
Engaged Sweeper
Thank you,
It’s confusing to see an asset connected to two different switches. The only way to know is by the last seen column . It would be nice to auto delete after 1 week
Susan_A
Lansweeper Alumni
This is expected behavior and cannot be changed. For each switch port, Lansweeper lists the last asset to be connected to (detected on) that port. The date listed next to the port indicates when the asset was connected to the port. If another asset connects and the switch is rescanned, the new connection will replace the old one. If no new asset connects however, the old connection will remain on the switch page indefinitely. There is no built-in option for removing this data.