There is no real time alert, but we can schedule for a report to be sent out regularly.
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 60 DAY)
and ASSET_HISTORY.DESCRIPTION not like '%KB%'
and ASSET_HISTORY.DESCRIPTION not like '%reboot%')
and
(ASSET_HISTORY.DESCRIPTION like 'Found software item%'
or ASSET_HISTORY.DESCRIPTION like '%remove%'
or ASSET_HISTORY.DESCRIPTION like '%change%')
order by TIME DESC
this one for hardware only.
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 60 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
and this is for software changes only.
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 60 DAY)
and ASSET_HISTORY.DESCRIPTION not like '%KB%'
and ASSET_HISTORY.DESCRIPTION not like '%reboot%'
and ASSET_HISTORY.DESCRIPTION not like '%mac%'
and ASSET_HISTORY.DESCRIPTION not like '%user%'
and ASSET_HISTORY.DESCRIPTION not like '%ip changed%'
and ASSET_HISTORY.DESCRIPTION not like '%video controller%'
and ASSET_HISTORY.DESCRIPTION not like '%domain changed%'
and ASSET_HISTORY.DESCRIPTION not like '%ram total changed%'
and ASSET_HISTORY.DESCRIPTION not like '%registry max size%'
and ASSET_HISTORY.DESCRIPTION not like '%name%')
and
(ASSET_HISTORY.DESCRIPTION like 'Found%'
or ASSET_HISTORY.DESCRIPTION like '%remove%'
or ASSET_HISTORY.DESCRIPTION like '%change%')
order by TIME DESC
http://www.itninja.com/blog/view/how-to-get-alerts-on-inventory-changes-and-the-related-report-for-the-k1000-5-4 - OlivierH 11 years ago