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 <module>
node_status()
File "bigip_nodes.py", line 22, in node_status
status = b.LocalLB.NodeAddressV2.get_statistics(iter([node]))
File "build/bdist.linux-x86_64/egg/bigsuds.py", line 482, in wrapped_method
File "build/bdist.linux-x86_64/egg/suds/client.py", line 521, in __call__
File "build/bdist.linux-x86_64/egg/suds/client.py", line 581, in invoke
File "build/bdist.linux-x86_64/egg/suds/client.py", line 619, in send
File "build/bdist.linux-x86_64/egg/suds/client.py", line 670, in process_reply
bigsuds.ServerError: Server raised fault: 'Exception caught in LocalLB::urn:iControl:LocalLB/NodeAddressV2::get_statistics()
Exception: Common::OperationFailed
primary_error_code : 16908336 (0x01020030)
secondary_error_code : 0
error_string : '
I tested my code by changing the call to get the IP address using: LocalLB.NodeAddressV2.get_address and it works, so I know I am passing the correct paramters, but only the get_statistics method is failing.
Any ideas of what the issue may be or another way to get the current connections counts of a node?
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}}
That worked, thank you @JRahm. I will accept this as solution.