Kace can you edit smart labels ip address range.
I am wondering if there is a way to edit smart labels. When we first created our labels we were using the ip address range of 192.168.11. We now have set up ip address ranges of 192.168.9/10 as well. Anyway to add this to the smart labels like so 192.168.9-11 or do we need to create new smart lables? I am pasting an example smart label we have created.
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 (((( CHASSIS_TYPE like '%Desktop%') OR CHASSIS_TYPE like '%Laptop%') AND (1 in (select 1 from ORG1.MACHINE M2 where M2.ID = MACHINE.ID and M2.IP like '%192.168.11%' union select 1 from ORG1.MACHINE_NICS where MACHINE.ID = MACHINE_NICS.ID and MACHINE_NICS.IP like '%192.168.11%')) ))
-
How would I change the ip address in the code above to change address range. 192.168.9.1-254 , 192.168.10.1-254, 192.168.11.254. It should be '%192.168.9-11%?? - mike10_13 10 years ago
Answers (2)
You can edit a smart label. Go to Home-Label-Smart Labels
Select your label. When the page reloads, you have the option to edit the SQL code and, if the smart label was created in version 5.5, to edit using the original editor.
Comments:
-
How would I change the ip address. We are now using 192.168.9.1-254, 192.168.10.1-254, and 192.168.11.1-254. The example above in the question shows '%192.168.11% for 192.168.11.1-254. I would change it to '%192.168.9-11% ?? - mike10_13 10 years ago
I would start by duplicating your existing label then tinkering. If you are fine with separate labels, then try replacing .11% with .9% and another with .10%
Or, you may be able to modify what you have by using pipes and keep one smart label. For example:
like '%192.168.11%|%192.168.9|%192.168.10%'
It will require some trial and error, most likely.
Comments:
-
Thank you - mike10_13 10 years ago