→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nnewton
Engaged Sweeper III
I'm trying to create reports that we can import into a CMDB system, the import happens every hour and the receiving system logs an audit entry every time the import process runs because I am using the "LastSeen" field to determine if the asset information has changed.

This is generating a lot of audit entries, even if the actual asset data in the report has not changed.

I noticed there are "LastSaved" and "LastChanged" fields in the Asset tables, but these do not appear to change when I change the data for an asset.

"LastSaved" is NULL for every asset and "LastChanged" has a date, but it is not the date that the asset was last changed.

Should these fields be updating? Is there a better way to determine when an asset's information has changed?

Thanks
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
Lansweeper scans and stores a huge amount of data from network assets. Things like error events, last logged on user, toner status or page count on printers likely change with every scan.

The "last seen" date refers to the last date when an asset successfully has been scanned, no matter if anything has changed on it or not.

Nearly every table in the Lansweeper database has a "lastchanged" column. This is the date when information in this table was added or updated. You might be able to select tables which are relevant for your purpose. If in your CMDB the last logged on user is important, you could use tblCPlogoninfo.logontime as filter for the import. For other purposes you can use the "lastchanged" field of other tables.

Note: tblAssets.LastSaved does not always get updated if any change has been made to an asset. We recommend not using this field for your purpose.

View solution in original post

3 REPLIES 3
Daniel_B
Lansweeper Alumni
Indeed, changes in field of tblAssetCustom don't always update the Lastchanged column of it. This is a misbehavior our development is aware of. However, in most other tables this date should be correct.
nnewton
Engaged Sweeper III
So LastChanged should be updating whenever information in same table is changed? This is what I assumed, but this is not what I am seeing.

EG. The LastChanged on tblAssetCustom is: '2013-02-21 08:25:32.643', but when I change the asset's information: State, Model, Serial, Custom Field 1, it remains on '2013-02-21 08:25:32.643'.

Is the LastChanged date only updated when information is changed during an automatic scan?
Daniel_B
Lansweeper Alumni
Lansweeper scans and stores a huge amount of data from network assets. Things like error events, last logged on user, toner status or page count on printers likely change with every scan.

The "last seen" date refers to the last date when an asset successfully has been scanned, no matter if anything has changed on it or not.

Nearly every table in the Lansweeper database has a "lastchanged" column. This is the date when information in this table was added or updated. You might be able to select tables which are relevant for your purpose. If in your CMDB the last logged on user is important, you could use tblCPlogoninfo.logontime as filter for the import. For other purposes you can use the "lastchanged" field of other tables.

Note: tblAssets.LastSaved does not always get updated if any change has been made to an asset. We recommend not using this field for your purpose.