There may be times when you need to group devices by installation date.   A practical example might be that you want to deploy an image to a system that has not be re imaged in 2 years.  Another reason to use this might be if you are deploying images and you want to run an aggressive patch schedule on newly imaged systems.  Since we cannot rely solely on K1000 agent creation date as this would apply to new agent installs and not only new machines, we need to separate the machines that were just re imaged from those that received the agent recently.

The problem lies in the smart label drop downs.  Not every inventory field is shown when building a smart label and the inventory item OS Install Date is one of those items.  In order to build a smart label for this we can use a simple SQL query pasted in over a new smart label.

First, build a new smart label from devices.  It does not matter what you use since we will wipe out the query.  Go to Label Management --> Smart Labels and click on the name of the smart label that was created.

JG5TGv.png

Click on Edit SQL and paste in the following SQL statement:

SELECT MACHINE.NAME AS SYSTEM_NAME, OS_INSTALLED_DATE as TOPIC_ID FROM MACHINE  WHERE (((TIMESTAMP(MACHINE.OS_INSTALLED_DATE) <= NOW() AND TIMESTAMP(MACHINE.OS_INSTALLED_DATE) > DATE_SUB(NOW(),INTERVAL 48 HOUR))))

Save the label.  This will automatically label devices that were imaged within the last 48 hours.

Now we can use that label in a patch schedule that aggressively patches machines in that label while keeping older machines out of that patch schedule.

We can alter the time query a bit to find whatever devices we need.  For example devices that were imaged over 2 years ago would use this query:

SELECT MACHINE.NAME AS SYSTEM_NAME, OS_INSTALLED_DATE as TOPIC_ID FROM MACHINE  WHERE ((TIMESTAMP(MACHINE.OS_INSTALLED_DATE) < DATE_SUB(NOW(),INTERVAL 2 YEAR)))

Happy labeling!