• 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 Monitor UAGs for Port Exhaustion in ControlUp

Posted on October 21, 2025

A user is having issues with intermittent connections dropping and was advised to periodically reboot the UAGs due to port exhaustion. Other suggestions and ways to monitor the UAGs for this issue were discussed. There is currently no UAG monitoring available in ControlUp, but it is expected to be added in version 9.2. The discussion also includes a mention of a UAG health check script using the Horizon API, and the upcoming feature of UAG support in version 9.2.


Read the entire ‘How to Monitor UAGs for Port Exhaustion in ControlUp’ thread below:

I’m new to control up for the most part, took an act of congress to get it at our company as we have some old skool mentality of reactive vs proactive. With that said we have 2 UAGs and recently had an issue where users from another company connect into our vdi pool of which others connect to no issues, and they were having issues with intermittent connections dropping or not connecting through App and Web. We isolated this by removing one of the UAGs from the F5 vip and stabilized connections. Another engineer gathered logs from the UAG’s and Ominissa said it was port exhaustion and to just periodically reboot the UAGs. As one in my place would feel, I’m not satisfied with this recommendation and finding it rather difficult to monitor these UAGs from a port exhaustion perspective and seeing if anyone could offer up advise on how to effectively do this please? Thanks


Hi Chad we do have UAG monitoring coming on the Road map but that will most likely be a feature in version 9.2 and I don’t have any ETA on that.

@member is our Horizon/Ominissa guru He may have a suggestion.

But I did some reach for you. (Please do your on reach on the below as well)

When you see intermittent connection failures or drops, and logs indicate port exhaustion, it means the ephemeral port range (usually 49152–65535 on Linux) is being consumed faster than ports are being released.

Common causes:

• Idle TCP connections not being closed properly (session leak).

• Backend servers not responding to FIN/RST.

• Misbalanced traffic on the F5 VIP (one node handling more traffic).

• Too many concurrent short-lived connections.

• System limits (nf_conntrack table exhaustion, TCP_TIME_WAIT sockets, etc.).

You can use SSH into the UAG (root or admin) and check the following:

Ephemeral Port Usage

“`

Show socket usage (LISTEN, ESTABLISHED, TIME_WAIT)

sudo ss -s“`

Look at the TCP section — if you see TIME_WAIT or SYN_RECV counts in the tens of thousands, that’s your smoking gun.

Connections by State

“`

sudo netstat -an | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}’“`

You’ll get a summary like:

“`

ESTABLISHED 1250

TIME_WAIT 49000

CLOSE_WAIT 3“`

If TIME_WAIT dominates, your sockets are lingering.

Ways to Monitor:

Lightweight shell script you can use to monitor. But this is not something I have used so i suggest testing ad caution

Schedule via cron every 5 mins:

“`

!/bin/bash

ss -s | grep ‘TCP:’ >> /var/log/portusage.log“`

Then graph with a log shipper or export to your SIEM.

Real-time check

Use:

“`

watch -n 10 "sudo ss -s | grep ‘TCP:’"“`

This lets you visualize port churn live.

Diagnostics Beyond Ports

It’s worth also checking:

A. Conntrack Table

“`

cat /proc/sys/net/netfilter/nf_conntrack_count

cat /proc/sys/net/netfilter/nf_conntrack_max“`

If count ≈ max, increase it:

“`

sysctl -w net.netfilter.nf_conntrack_max=262144“`

Verify Idle Timeouts

Compare UAG TCP timeout settings to your load balancer and backend (e.g., Horizon Connection Server). If F5 or UAG keeps sessions open longer than the backend expects, TIME_WAIT sockets will accumulate.

F5 VIP Load Balancing

Check:

• Are you using least connections or round robin?

• Are session persistence (source IP affinity) settings unevenly distributing sessions?

If one UAG gets sticky traffic, it’ll exhaust faster.


sorry Luke, that chatgpt or whatever answer it is talks nonsense. The uag can officially do up to 2000 connections but is known to start stuttering at a way lower number. At this moment the only thing we have in the tool is security gateway information for sessions and a uag health check script that uses the horizon api. In 9.2 indeed we are adding uag support that will get the uag addresses from horizon and then connect to the uag rest api to gather data.


@member thanks 🙂 why I tag you in just in case I was talking nonsense

keeping me honest


I should have put some smilies in there btw 🙂

Continue reading and comment on the thread ‘How to Monitor UAGs for Port Exhaustion in ControlUp’.  Not a member? Join Here!


Categories: All Archives, ControlUp Scripts & Triggers
Topics: Linux, Logs, Microsoft, Microsoft Active Directory, Scripts, Security, VDI

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..