Forum Discussion

Ron's avatar
Ron
Icon for Nimbostratus rankNimbostratus
Apr 14, 2023

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...
  • JRahm's avatar
    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}}