gpt4 book ai didi

powershell - F5 BIG-IP Powershell/iControl-在节点级别查询当前连接

转载 作者:行者123 更新时间:2023-12-02 23:27:28 28 4
gpt4 key购买 nike

我正在使用Powershell脚本对BIG-IP LTM后面的服务器进行自动化部署。

我有使用iControl powershell cmdlet禁用和重新启用节点的简单脚本:
Disable-F5.LTMNodeAddress -Node xxx.xxx.xxx.xxx
这些工作得很好,但是要使其成为一个真正的自动化过程,我接下来需要的是一种在节点流失时查询与节点的当前连接的方法,以便直到当前连接= 0时,我的自动化才开始部署。

我已经尝试了here代码,但没有任何运气,然后又钻了几个兔子洞,这些洞并没有给我我所需的东西。

希望有人最近尝试过此方法,并祝我好运

谢谢!

最佳答案

找到了。

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}}`

关于powershell - F5 BIG-IP Powershell/iControl-在节点级别查询当前连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30627824/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com