/build/static/layout/Breadcrumb_cap_w.png

How to create smart label based on K1 Agent connection time?

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

Answers (4)

Posted by: matthall 11 years ago
Purple Belt
1

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

I'd be interested in other options/ideas.

Posted by: dugullett 11 years ago
Red Belt
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 ))

Comments:
  • Thanks dugullett

    I will give your method a try - dkurz8814 11 years ago
  • 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)? - dkurz8814 11 years ago
    • 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 )) - dugullett 11 years ago
Posted by: gcarpenter 11 years ago
Green Belt
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%'))

Comments:
  • 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. - gcarpenter 11 years ago
Posted by: chucksteel 11 years ago
Red Belt
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?

 


Comments:
  • because some machines will already have the software-this is for new hardware that may not have the software already installed - dkurz8814 11 years ago
  • KACE won't install the software if it is already present on the machine, so that shouldn't be a concern. - chucksteel 11 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ