• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
ControlUp Community

ControlUp Community

Connect, Learn, and Grow

  • Blog
  • Podcast
  • Meetups
  • Archives
  • Categories
    • ControlUp One Platform
    • ControlUp for Apps
    • ControlUp for Compliance
    • ControlUp for Desktops
    • ControlUp Scripts & Triggers
    • ControlUp Synthetic Monitoring
    • ControlUp for VDI
  • Topics
  • Events
    • Logos & Wallpaper
    • ControlUp.com
  • Join

How to Set / Override the Controlup Edge DX Location Manually

Posted on June 22, 2023

A user asked about manually setting the Controlup EdgeX location. It is possible to override the location using the IP address and a script is provided to check the IP address against known subnets and their corresponding locations. Locations must be set on the tenant side and must be in valid JSON with the property "LocationsByIpRange". ControlUp does not offer specific documentation for this feature. The script and full JSON example are included in the discussion.


Read the entire ‘Overriding Controlup Edge DX Location Manually’ thread below:

Afternoon, trying to find some details on how to manually set the edgedx location. Our current issue at the moment is all our device’s sit on our sd-wan. So the location data is being determined by our companies out bound connection. We are running iGel devices and all are running on the corporate network.


It’s possible to override location using the IP address, in the custom agent settings. In your case would you have different IP’s for each location?


Yes different IP subnets at each location was working on the script below but to be honest wasnt sure how edgedx received its location.

“`#!/bin/bash

Define the known list of subnets and their corresponding locations

declare -A subnets=(

["192.168.1.0/24"]="Location A"

["10.0.0.0/8"]="Location B"

["172.16.0.0/12"]="Location C"

# Add more subnets and corresponding locations as needed

)

Get the system’s IP address

ip_address=$(curl -s http://checkip.amazonaws.com)

Function to check if the IP address matches any subnet

function check_subnet() {

local ip=$1

for subnet in "${!subnets[@]}"; do

if [[ $(ipcalc -cs "$subnet" "$ip") -eq 0 ]]; then

echo "${subnets[$subnet]}"

return

fi

done

echo "Unknown Location"

}

Check the IP address against the known subnets

location=$(check_subnet "$ip_address")

Set the location accordingly

echo "Setting location to: $location"

Do whatever actions you need based on the location

For example, set environment variables, update configuration, etc.“`


You can’t set it on the client side. You set it on the tenant side

These are public IP addresses, which may make your efforts a bit harder.


Oh nice, does controlup have write up on this functionality? Just so I can reference it in or kb


I don’t think so. Typically settings on the agent settings section are meant to quickly address some use case.

If you need help around this, feel free to discuss it here


Sounds good, initial question is there anything appending the "LOCATIONSBYIPRANGE". My custom agent settings does not have this entry. Just want to make sure I dont miss anything that is needed.


The IP range might actually be internal. Stand by while I confirm that.

The custom agent settings need to be valid JSON. The locationsbyiprange property is a JSON array.

“`{

"ProcessExcludeList": "RuntimeBroker|ApplicationFrameHost|browser_broker|ctfmon|sppsvc|sihost|taskhostw|conhost",

"RecordProcsWithCpuOverThreshold": 2,

"RecordProcsWithMemoryOverThreshold": 2,

"ConvertLfToCrlfForWindowsScripts": true,

"LocationsByIpRange": [

{

"iprange": "192.168.8.0/24",

"city": "Groningen",

"latlon": "53.1, 6.5"

},

{

"iprange": "192.168.214.0/24",

"city": "Hollywood, FL",

"latlon": "26.0130991, -80.1536618"

},

{

"iprange": "192.168.188.0/24",

"city": "The Keys, FL",

"latlon": "24.6135186,-81.4735408"

},

{

"iprange": "192.168.212.0/24",

"city": "Fort Lauderdale, FL",

"latlon": "26.1179994, -80.1377305"

},

{

"iprange": "67.191.36.145/32",

"city": "MiamiPub",

"latlon": "25.7968774, -80.2789186"

},

{

"iprange": "31.168.39.90/32",

"city": "Düsseldorf",

"latlon": "51.2383712, 6.6742687"

},

{

"iprange": "10.20.30.0/24",

"city": "Düsseldorf",

"latlon": "51.2383712, 6.6742687"

},

{

"iprange": "10.21.30.0/24",

"city": "Düsseldorf",

"latlon": "51.2383712, 6.6742687"

},

{

"iprange": "10.100.1.126/32",

"city": "Lincoln, NE",

"latlon": "40.8136704, -96.7052787"

},

{

"iprange": "172.20.20.0/24",

"city": "Lincoln, NE",

"latlon": "40.8136704, -96.7052787"

},

{

"iprange": "192.168.88.5/32",

"city": "New Orleans, LA",

"latlon": "29.957609, -90.066292"

},

{

"iprange": "10.100.1.144/32",

"city": "Yellow Stone, WY",

"latlon": "44.4283314,-110.5905142"

}

]

}“`

Continue reading and comment on the thread ‘How to Set / Override the Controlup Edge DX Location Manually’.  Not a member? Join Here!


Categories: All Archives, ControlUp for Desktops, ControlUp Scripts & Triggers
Topics: Browsers, ControlUp Agent, IGEL, Physical Desktops, Scripts, SD-WAN

Ask Us Anything, Connect, Learn, and Grow with the ControlUp Community!

Login to the ControlUp Community to ask us anything, stay up-to-date on what’s new and coming soon and meet other like-minded techies like you.

Not already a member? Join Today!

Primary Sidebar

ControlUp Academy

Enroll in ControlUp Academy for expert-led technical training, equipping you with skills to effectively deploy, manage, and grow your ControlUp investment.

Learn here >

Rotating Images

Hidden Gem from our Community on Slack!

ControlUp Betas - What's Coming Next?
NEW ControlUp Features - Stay Up-to-Date!
ControlUp Scripts - Scripting, Zero to Hero
Latest KB Articles - Be the First to Learn
Did you Know - with Sivan Kroitoru
Practical Perspectives Technical Use Case Training

Video Tutorials Library

Visit our technical how-to videos, offering step-by-step tutorials on advanced features, troubleshooting, and best practices.

Watch here >

ControlUp Blog

Check out the ControlUp blog for expert advice and in-depth analysis.

Read here >

ControlUp Script Library

Visit the ControlUp technical script library, which offers a multitude of pre-built scripts and custom actions for your monitoring and troubleshooting requirements.

See here >

ControlUp Support

Visit the ControlUp support home and to delve deeper into ControlUp solutions.

Browse here >

Download ControlUp RealTime DX

Start with ControlUp for real-time end-user environment insights, swift troubleshooting, and unprecedented performance optimization. Download now.

Download here >

Footer

      

ControlUp Community
Of Techie, By Techie, For Techie!

Terms of Use | Privacy Policy | Security
Dive Deeper, Learn more at ControlUp.com

  • facebook
  • twitter
  • youtube
  • linkedin

© 2023–2025 ControlUp Technologies LTD, All Rights Reserved.

We use cookies to ensure that we give you the best experience on our website. by continuing to use this site you agree to our Cookie policy..