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%')) ))

 

 

 

Answer Summary:
Cancel
1 Comment   [ + ] Show Comment

Comments

  • 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%??
Please log in to comment

Answers

0

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. 

Answered 03/31/2014 by: rockhead44
Tenth Degree Black Belt

  • 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% ??
Please log in to comment
0

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.

 

Answered 03/31/2014 by: rockhead44
Tenth Degree Black Belt

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