Table of Contents
- 5.3
- Creating the Alert
- Report Method
- Email Alert method
- 5.4
5.3
If you want to be alerted when a new piece of software is installed on a machine then you could write one with the following query. This query will look at the asset history to determine what has been installed. If a machine does not check in for more than 1 day then it should not matter as the TIME column represents the time it was recorded in the asset history and not the time it was installed. To accurrately determine the time it was installed you would need to check the machine itself.
select TIME, ASSET.NAME as MACHINE_NAME, DESCRIPTION
from ASSET_HISTORY, ASSET
WHERE DESCRIPTION like '%Found Software%' and
ASSET_HISTORY.TIME > DATE_SUB(NOW(),INTERVAL 1 DAY) and
ASSET_ID=ASSET.ID
|
If you were searching for a specific title pattern you could add this
and ASSET_HISTORY.DESCRIPTION like '%Office%'
If you wanted to exclude a specific title then you could add this to your query
and ASSET_HISTORY.DESCRIPTION NOT LIKE '%Reader%'
If you wanted to sort the results by machine first and them timethen you could add something like this
ORDER BY MACHINE_NAME ASC, TIME DESC
Now you can make a schedule report or Email Alert out of the above query depending on your needs.
Report method = Good if you just want to see what's being added in, let's say a daily report.
Alert method = Good getting notified quickly, like every 15 minutes we will check for new software added and send you an email.
Creating the Alert
Report Method
- Under Reporting > Reports > Choose Action > New SQL report, paste in the query and save your report.
- Then go under the Schedule Report tab to schedule this report.
(http://k1000/adminui/report_schedule_list.php)
Email Alert method
- Under Reporting > Email Alerts > Choose Action > Add new Asset Notification.
- Give the notification a title and Recipient (don't worry about filling out the search criteria, our query is going to replace that).
- Click Create Notification to create it.
- Once created, click on the alert.
- Change the frequency to whatever you wish.
- Under the 'Notification Query' text box, paste in the query from above.
- Save your alert.
5.4
In 5.4, ASSET_HISTORY's table structure changed, so the rule is going to be a little different, but can accomplish the same thing.
Select
ASSET.NAME As MACHINE_NAME,ASSET_HISTORY.TIME As TIME,ASSET_HISTORY.VALUE1 As 'Software Name'
From ASSET,ASSET_HISTORY
Where
ASSET_HISTORY.ASSET_ID = ASSET.ID And
(ASSET_HISTORY.TIME > Date_Sub(Now(), Interval 1 Day) And
(ASSET_HISTORY.FIELD_NAME = "SOFTWARE" And
ASSET_HISTORY.CHANGE_TYPE = ("detected")))
If you were searching for a specific title pattern you could add this
and ASSET_HISTORY.VALUE1 like '%Office%'
If you wanted to exclude a specific title then you could add this to your query
and ASSET_HISTORY.VALUE1 NOT LIKE '%Reader%'
If you wanted to sort the results by machine first and them timethen you could add something like this
ORDER BY MACHINE_NAME ASC, TIME DESC
Now you can make a schedule report or Email Alert out of the above query depending on your needs.
Report method = Good if you just want to see what's being added in, let's say a daily report.
Alert method = Good getting notified quickly, like every 15 minutes we will check for new software added and send you an email.
Creating the Alert
Same as 5.3 method above.