/build/static/layout/Breadcrumb_cap_w.png

Smart label for software deployment

I have a smart machine label setup to detect Software Description = UltraVNC and machine IP does not contain 10.1. and have the UltraVNC configuration script run against it. The problem is that machines are rebooting several times a day as this script deploys to them. I can go into the machine inventory and find the UltraVNC installed on the machine. Why are machines not removing themselves from the label?

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 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 like '%UltraVNC%')) ) AND (1 in (select 1 from ORG1.MACHINE M2 where M2.ID = MACHINE.ID and M2.IP not like '%10.1.%' union select 1 from ORG1.MACHINE_NICS where MACHINE.ID = MACHINE_NICS.ID and MACHINE_NICS.IP not like '%10.1.%')) ))

0 Comments   [ + ] Show comments

Answers (5)

Posted by: cmccracken 12 years ago
Orange Senior Belt
0
Hey Scott,

I believe you would want to set the description to != UltraVNC. That way, once UltraVNC is inventoried, the label is no longer valid for that PC.

Casey
Posted by: ScottinOkla 12 years ago
Orange Belt
0
Ok, now I just feel stupid...

I build my logic around finding the software so that I would know when I couldn't find the software, but in the end I forgot to reverse the logic.

Thank you for the catch...
Posted by: GillySpy 12 years ago
7th Degree Black Belt
0
you also want to check your IP comparison logic. Right now you are going to match on machines that have two NICS but one of them does not have 10.1 somewhere in their IP. Also your wilcards are allowing 10.1 anywhere in the IP address. Are you actually interested in excluding machines that begin with address 10.1? Also, does it matter if that IP is the current IP talking to kbox or any IP on any adapter for that machine?
Posted by: ScottinOkla 12 years ago
Orange Belt
0
What I was trying to accomplish was...

Machines that are not in the Central Office (ie DHCP range 10.1.x.x) and did not have UltraVNC to have it installed. I also just added the requirement for Windows XP. 99.9% of our machines do not have two NICs, they are desktop computers. I deleted the old label and created a new one.

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.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 like '%UltraVNC%')) ) AND OS_NAME like '%Windows XP%') AND (1 in (select 1 from ORG1.MACHINE M2 where M2.ID = MACHINE.ID and M2.IP not like '%10.1.%' union select 1 from ORG1.MACHINE_NICS where MACHINE.ID = MACHINE_NICS.ID and MACHINE_NICS.IP not like '%10.1.%')) ))/code]
Posted by: GillySpy 12 years ago
7th Degree Black Belt
0
Okay then the smart label query could be:


select MACHINE.* from ORG1.MACHINE
LEFT JOIN
(select MACHINE_ID from MACHINE_SOFTWARE_JT MS
JOIN SOFTWARE S ON S.ID=MS.SOFTWARE_ID and S.DISPLAY_NAME LIKE '%UltraVNC%') SW ON SW.MACHINE_ID=MACHINE.ID
where
SW.MACHINE_ID IS NULL /* do not have UltraVNC */
and MACHINE.IP NOT LIKE '10.1.%'
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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