Hardware Changes History
Feel free to improve on the filter if you find I have missed out any hardware change.
select ASSET_HISTORY.TIME, ASSET.NAME, ASSET_HISTORY.DESCRIPTION
from ASSET
left join ASSET_TYPE on ASSET.ASSET_TYPE_ID = ASSET_TYPE.ID
left join ASSET_HISTORY on ASSET.ID = ASSET_HISTORY.ASSET_ID
where
(ASSET_TYPE.ID = 5
and NOW() < DATE_ADD(ASSET_HISTORY.TIME, INTERVAL 30 DAY)
and ASSET_HISTORY.DESCRIPTION not like '%KB%'
and ASSET_HISTORY.DESCRIPTION not like '%reboot%' )
and
(
ASSET_HISTORY.DESCRIPTION like 'video controllers changed from%'
or ASSET_HISTORY.DESCRIPTION like 'mac changed from%'
or ASSET_HISTORY.DESCRIPTION like 'processor changed from%'
or ASSET_HISTORY.DESCRIPTION like 'ram total changed from%'
or ASSET_HISTORY.DESCRIPTION like 'registry max size changed from%'
or ASSET_HISTORY.DESCRIPTION like 'ip changed from%'
or ASSET_HISTORY.DESCRIPTION like 'cd devices changed from%'
or (ASSET_HISTORY.DESCRIPTION like '%changed from%' and ASSET_HISTORY.DESCRIPTION like '%disk%')
or (ASSET_HISTORY.DESCRIPTION like '%changed from%' and ASSET_HISTORY.DESCRIPTION like '%bios%')
or (ASSET_HISTORY.DESCRIPTION like '%changed from%' and ASSET_HISTORY.DESCRIPTION like '%ram%')
)
order by TIME DESC
select ASSET_HISTORY.TIME, ASSET.NAME, ASSET_HISTORY.DESCRIPTION
from ASSET
left join ASSET_TYPE on ASSET.ASSET_TYPE_ID = ASSET_TYPE.ID
left join ASSET_HISTORY on ASSET.ID = ASSET_HISTORY.ASSET_ID
where
(ASSET_TYPE.ID = 5
and NOW() < DATE_ADD(ASSET_HISTORY.TIME, INTERVAL 30 DAY)
and ASSET_HISTORY.DESCRIPTION not like '%KB%'
and ASSET_HISTORY.DESCRIPTION not like '%reboot%' )
and
(
ASSET_HISTORY.DESCRIPTION like 'video controllers changed from%'
or ASSET_HISTORY.DESCRIPTION like 'mac changed from%'
or ASSET_HISTORY.DESCRIPTION like 'processor changed from%'
or ASSET_HISTORY.DESCRIPTION like 'ram total changed from%'
or ASSET_HISTORY.DESCRIPTION like 'registry max size changed from%'
or ASSET_HISTORY.DESCRIPTION like 'ip changed from%'
or ASSET_HISTORY.DESCRIPTION like 'cd devices changed from%'
or (ASSET_HISTORY.DESCRIPTION like '%changed from%' and ASSET_HISTORY.DESCRIPTION like '%disk%')
or (ASSET_HISTORY.DESCRIPTION like '%changed from%' and ASSET_HISTORY.DESCRIPTION like '%bios%')
or (ASSET_HISTORY.DESCRIPTION like '%changed from%' and ASSET_HISTORY.DESCRIPTION like '%ram%')
)
order by TIME DESC
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
mac456
12 years ago
Posted by:
GillySpy
12 years ago
Posted by:
jhilton
12 years ago
Thank you, this worked for me, but I had to remove the filters to not include.
Last Reboot changed from '2012-01-25 12:32:42 -0500' to '2012-01-25 12:52:12 -0500' Last Shutdown changed from '2012-01-25 12:32:42 -0500' to '2012-01-25 12:52:12 -0500' Ram Total changed from '2048' to '4096'
Wouldn't register at first because the word "Reboot" was found in the entry. I've removed the filters I don't want and only included the ones to look for. It includes the entire entry from Asset History when it runs, but at least we know what has gone on.
Thanks,
Jeff
Last Reboot changed from '2012-01-25 12:32:42 -0500' to '2012-01-25 12:52:12 -0500' Last Shutdown changed from '2012-01-25 12:32:42 -0500' to '2012-01-25 12:52:12 -0500' Ram Total changed from '2048' to '4096'
Wouldn't register at first because the word "Reboot" was found in the entry. I've removed the filters I don't want and only included the ones to look for. It includes the entire entry from Asset History when it runs, but at least we know what has gone on.
Thanks,
Jeff
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.