2

I am working on Powershell scripts to do automated deployments to our servers behind our BIG-IP LTM.

I have simple scripts that use the iControl powershell cmdlets to disable and re-enable the nodes:

Disable-F5.LTMNodeAddress -Node xxx.xxx.xxx.xxx

These work quite well, however for this to become a truly automated process, what I need next is a way to query the Current Connections to the node as they bleed off so that my automation doesn't begin the deployment until current connections = 0.

I've tried the code here without any luck and gone down a few more rabbit holes that didn't get me what I need.

Hoping someone has tried this more recently and had better luck than I am

Thanks!

Community
  • 1
  • 1
Mike
  • 67
  • 10

1 Answers1

3

Found it.

https://devcentral.f5.com/questions/get-local-traffic-statistics-gt-nodes

`$ic = get-F5.iControl

$ic.LocalLBNodeAddress.get_statistics("NODE_IP") | %{$.statistics.statistics | ? {$.type -eq "STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS"} | %{$_.value.low} }`

Mike
  • 67
  • 10