Location Wizard Action - How to re-evaluate?

I’m trying to use the location wizard to setup an action that will check the IP ranage a system is on and use it to set the location. It works fine when the system first appears, but once the system get a location set, it won;t change if the IP address changes.

For example.

10.0.1.0-10.0.1.255 is DataCenter1

10.0.2.0-10.0.2.255 is DataCenter2

system comes up with 10.0.1.10 and is assigned to DataCenter1. It is then moved to 10.0.2.10 but since the wizard relevance checks (not exists setting "Location By IP Range" of client) it won’t re-evaluate the system as the setting exists and leaves it in the wrong location.

Any way around this?

Using OR operator and custom relevance should be able to fix it. And if execution behavior is set to reapply
(not exists setting "Location By IP Range" of client) OR ( if (exists (registration ip addresses) whose (it as string starts with "10.0.1.")) then (value of setting "Location By IP Range" of client != "DataCenter1") else if (exists (registration ip addresses) whose (it as string starts with "10.0.2.")) then (value of setting "Location By IP Range" of client != "DataCenter2") else (value of setting "Location By IP Range" of client != "Unknown") )

Thanks. I was afraid of this. I might have to re-think how I doing this as I have 43 locations and its getting to have a huge relevance statement. I’ll try to see if I can break these into different runs.

I'm not sure I understand the scenario you're describing here. The Location Property Wizard creates both an action as well as a property. The action which updates the setting referenced by the property is set to re-apply whenever relevant (by default), and the applicability relevance does compare the device's IP range against the defined mapping. So, if a device's IP range changes, the Change "Location By IP Range" Setting action should re-run on the device to update the location reported.

1 Like

@Aram I’m not seeing it update systems when they change locations. I’m attempting to do a controlled experiment but keep getting interrupted with other issues. I hope to try something this weekend and will update once I do.

Thanks