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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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
Answered 08/22/2011 by: cmccracken
Orange Senior Belt

Please log in to comment
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...
Answered 08/22/2011 by: ScottinOkla
Orange Belt

Please log in to comment
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?
Answered 08/22/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
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]
Answered 08/23/2011 by: ScottinOkla
Orange Belt

Please log in to comment
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.%'
Answered 08/23/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity