Nevermind it seems to be working now , I created a new machine smart label using a generic search and forced one machine in that search to be inventoried once the label was applied I then opened the machine smart label and replaced the SQL and now it is picking up machines.

Doh!

I'm trying to create a machine smart label for when a piece of software is installed.

I have created the label then created a machine smart label and pasted in a MYSQL query I have created that returns the correct results (I have also created a temporary machine smart using just a plain view filter then replaced the SQL after). No computers are ever added to the smart label. The smart label is attached to the label at the bottom but there is no computer section that would show machines that match the label. I'm not sure what I am missing I have Smart Machine labels that I have created using the view searching and they work but there is no way to do software that way.

Other machine labels seem to contain the following SQL I have removed it is my current testing since it doesn't seem to make a difference in the SQL, but it still fails with it set.
UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS


SQL
SELECT *
FROM ORG5.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 = 5
INNER JOIN MACHINE_SOFTWARE_JT ON MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID
WHERE (
((MACHINE_SOFTWARE_JT.SOFTWARE_ID)="1564" ) or
((MACHINE_SOFTWARE_JT.SOFTWARE_ID)="5873" ) or
((MACHINE_SOFTWARE_JT.SOFTWARE_ID)="6444" ) or
((MACHINE_SOFTWARE_JT.SOFTWARE_ID)="7164" ) or
((MACHINE_SOFTWARE_JT.SOFTWARE_ID)="12107" )
);
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity