I would like to create a smart label so that when a machine first checks in, a specific label is applied and an action (in this case a managed install set) runs. Is this possible? I could not see a way to create a smart label based on agent time, yet I could see the item listed in the machine's inventory.

Has anyone tried to do this before

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

The closest you may get would be to use "Last Sync."

I'd be interested in other options/ideas.

Answered 12/18/2012 by: matthall
Purple Belt

Please log in to comment
1

If I'm understanding what you need correctly you can try something like this label. This one will check for when the OS was installed. This example will return anything that has had an OS installed in the past day. It can be adjusted to what you need.

select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,

UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS

from ORG1.MACHINE

LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION

ON SMMP_CONNECTION.KUID = MACHINE.KUID AND KUID_ORGANIZATION.ORGANIZATION_ID = 1

where (OS_INSTALLED_DATE > (CURDATE() - INTERVAL 1 DAY ))
Answered 12/19/2012 by: dugullett
Red Belt

  • Thanks dugullett

    I will give your method a try
  • So I just ran the smart label filter, and it returned two machines, neither of which have been deployed recently.

    One machine has this as the install date
    Installed Date: 2012/09/07 15:16:03

    The other has this
    Installed Date: 2012/07/31 11:34:16

    Do I need to change any of the items in the SQL script other than the day interval (ie Las_sync_seconds, Last_sync_time, ect)?
    • That's all that needs changed. I ran it again on mine and it showed correct. I did change the interval to "1 HOUR" to test and found one machine with an install date of 2013/06/29. I guess it depends on the time set during install on how accurate it will be.

      When you run this query does it return the accurate time?

      SELECT NOW()


      You could also try changing the last line to this and see if it changes the results.

      where (OS_INSTALLED_DATE > DATE_SUB(NOW(), INTERVAL 1 DAY ))
Please log in to comment
0

Sounds like you are overcomplicating things.  You should do a smart label that checks to see if the software is installed, and if it isn't, it adds a label.  You can then do an install later. 

select MACHINE.*, C.CLIENT_CONNECTED, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
                       UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_SECONDS
                  from ORG1.MACHINE
                  LEFT JOIN KBSYS.KUID_ORGANIZATION O ON O.KUID=MACHINE.KUID LEFT JOIN KBSYS.SMMP_CONNECTION C ON C.KUID = MACHINE.KUID AND O.ORGANIZATION_ID = 1
                 where (((  (1  in (select 1 from ORG1.SOFTWARE, ORG1.MACHINE_SOFTWARE_JT where MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID and MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID and SOFTWARE.DISPLAY_NAME = 'Microsoft Silverlight')) ) AND MACHINE.CLIENT_VERSION not like '%5.1.10411.0%'))
Answered 12/19/2012 by: gcarpenter
Green Belt

  • That is my label for old versions of Silverlight, which I then run a managed install of the most current supported version of Silverlight. This covers you if they either have an old version of the software, or not at all.
Please log in to comment
0

If the wizard for creating a smart label doesn't show the field you need, then you can create it using another field and then edit it through Home, Label, Smart Labels. When you edit smart labels you have to manually update the SQL code which will allow you to use all of the fields in the database. I'm not clear on which field you're referring to when you say the agent time, however.

It sounds like you want the install to run on all machines though, so why not just deploy it to all computers?

 

Answered 12/19/2012 by: chucksteel
Red Belt

  • because some machines will already have the software-this is for new hardware that may not have the software already installed
  • KACE won't install the software if it is already present on the machine, so that shouldn't be a concern.
Please log in to comment
Answer this question or Comment on this question for clarity