Forum Discussion
Ron
Apr 14, 2023Nimbostratus
get_statistics method failing when trying to get current connection counts
I'm trying to get the connection counts of a certain node using: LocalLB.NodeAddressV2.get_statistics, but getting the following error from my Python script: File "bigip_nodes.py", line 94, in <m...
- Apr 14, 2023
Hi Ron...throwback! Haven't touched bigsuds in a hot minute...anyway, this is working for me against 15.1.8.1:
b = pc.BIGIP('172.16.2.115', 'admin', 'admin') nodes = b.LocalLB.NodeAddressV2.get_list() for node in nodes: print(b.LocalLB.NodeAddressV2.get_statistics([node])) {'statistics': [{'node': '/Common/172.16.102.5', 'statistics': [{'type': 'STATISTIC_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_REQUESTS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_SESSIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}]}], 'time_stamp': {'year': 2023, 'month': 4, 'day': 14, 'hour': 16, 'minute': 28, 'second': 0}} {'statistics': [{'node': '/Common/172.16.100.20%15', 'statistics': [{'type': 'STATISTIC_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_REQUESTS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_SESSIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}]}], 'time_stamp': {'year': 2023, 'month': 4, 'day': 14, 'hour': 16, 'minute': 28, 'second': 0}} {'statistics': [{'node': '/Common/172.16.100.20%16', 'statistics': [{'type': 'STATISTIC_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_REQUESTS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_SESSIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}]}], 'time_stamp': {'year': 2023, 'month': 4, 'day': 14, 'hour': 16, 'minute': 28, 'second': 0}}
- Apr 15, 2023
That worked, thank you @JRahm. I will accept this as solution.
JRahm
Apr 14, 2023Admin
Hi Ron...throwback! Haven't touched bigsuds in a hot minute...anyway, this is working for me against 15.1.8.1:
b = pc.BIGIP('172.16.2.115', 'admin', 'admin')
nodes = b.LocalLB.NodeAddressV2.get_list()
for node in nodes:
print(b.LocalLB.NodeAddressV2.get_statistics([node]))
{'statistics': [{'node': '/Common/172.16.102.5', 'statistics': [{'type': 'STATISTIC_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_REQUESTS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_SESSIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}]}], 'time_stamp': {'year': 2023, 'month': 4, 'day': 14, 'hour': 16, 'minute': 28, 'second': 0}}
{'statistics': [{'node': '/Common/172.16.100.20%15', 'statistics': [{'type': 'STATISTIC_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_REQUESTS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_SESSIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}]}], 'time_stamp': {'year': 2023, 'month': 4, 'day': 14, 'hour': 16, 'minute': 28, 'second': 0}}
{'statistics': [{'node': '/Common/172.16.100.20%16', 'statistics': [{'type': 'STATISTIC_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_BYTES_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_IN', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_PACKETS_OUT', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_CURRENT_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_MAXIMUM_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_PVA_SERVER_SIDE_TOTAL_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_REQUESTS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_SESSIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_TOTAL_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}, {'type': 'STATISTIC_CURRENT_PVA_ASSISTED_CONNECTIONS', 'value': {'high': 0, 'low': 0}, 'time_stamp': 0}]}], 'time_stamp': {'year': 2023, 'month': 4, 'day': 14, 'hour': 16, 'minute': 28, 'second': 0}}
- RonApr 15, 2023Nimbostratus
That worked, thank you @JRahm. I will accept this as solution.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects