How do we set an email alert once the connection on LB reached beyond some limit.. ex. 20k connection?
Two ways to get it.
1) Use an external monitoring system (let say Zabbix, Cacti, etc) to poll connection values of one or more VS using SNMP
REF - https://support.f5.com/csp/article/K45329113
2) Use an iRule to increase/decrease an iStat variable (to obtain the current connections). When the istat value will be above some threshold, you could trigger an alert using iCalls or by logging a message (with customer alerts)
REF - https://clouddocs.f5.com/api/irules/ISTATS__incr.html
REF - https://support.f5.com/csp/article/K59616664
REF - https://support.f5.com/csp/article/K3727
REF - https://support.f5.com/csp/article/K3667
Hope this helps you.