/build/static/layout/Breadcrumb_cap_w.png

Systems Management Question


Smart label - Machines not in a patch lable

05/16/2017 1190 views
Hi.

I'm trying to create a smart label that will exclude all machines that has assigned a label used by a patch schedule.
I go about this using "Label Name", and was wondering about best practices. Can you add more labels on one filter, or do you require one line for each device lable?

Now I have about 20 lables used in different Patch Schedules. And using the following smart label formula:
Label Names != "label name" OR
Label Names != "label name2" OR
and so on. 

Is there a better way to do this?
Currently this is not working as expected, showing all machines.


Answer Summary:
0 Comments   [ + ] Show comments

Comments


Answer Chosen by the Author

1
Here is the method I use:
I have a smart label that will apply to any machines that don't have a label that contains the word Patching. Here is the SQL code:
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 ((  (1 not in (select 1 from ORG1.LABEL, ORG1.MACHINE_LABEL_JT where MACHINE.ID = MACHINE_LABEL_JT.MACHINE_ID and MACHINE_LABEL_JT.LABEL_ID = LABEL.ID and LABEL.TYPE != 'hidden' and LABEL.NAME like '%Patching%')) ))
All of our other patching schedules are in the format of "Lab Patching", "Test Patching", etc. This way I don't have to go back and change my default patching label/schedule when new schedules are added.

Answered 05/17/2017 by: chucksteel
Red Belt

  • Thanks for your insight. I see this would work with us, I would need to to some adjustments though.
 
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