Performance API returning variable output

Not totally sure if this is a cnmaestro issue, configuration, or just my python requests but I figured it couldn’t hurt to ask.

My end goal is to return current rx_power for a dozen PTP670’s. I use a function which successfully returns the mac address of the units in a list, which I then loop through with a for statement.

The script runs clean and produces no errors or warning. All microwave links are stable and static.

My problem is, I am receiving 3 different types of output (examples below)
There is no pattern as to which device returns which respone (1, 2 or 3), and is different each time I send the get request. Every device has at one time returned the full output desired, so I think that rules out configuration issues. At first I thought maybe I was sending get requests too fast, or too many,… but sometimes it is the first few responses that return the severly limited output(‘data’ value = null) and then the rest are fine?

Any suggestions ???

1. full output with paging[‘total’] = 2,

response:

{'data': [{'ethernet': {'aux_interface': {'pkt_error': 0, 'rx': 0, 'tx': 0},
                        'link_loss': 77,
                        'main_psu_interface': {'pkt_error': 0,
                                               'rx': 639.41,
                                               'tx': 009.74},
                        'pcb_temperature': 46,
                        'rx_capacity': 23.540000915527344,
                        'rx_power': -53,
                        'sfp_interface': {'rx': 0, 'tx': 0},
                        'ssr': 0.699999988079071,
                        'tx_power': 23,
                        'tx_throughput': 7483.9,
                        'vector_error': -31.600000381469727},
           'mac': 'xx:xx:xx:xx:xx:xx',
           'managed_account': '',
           'mode': 'bhs',
           'name': 'dd-orth-2',
           'network': 'pine',
           'timestamp': '2021-01-11T11:02:14+00:00',
           'tower': 'DD',
           'type': 'ptp'},
          {'ethernet': {'tx_capacity': 23.540000915527344,
                        'tx_channel_util': 2.08},
           'mac': 'xx:xx:xx:xx:xx:xx',
           'managed_account': '',
           'mode': 'bhs',
           'name': 'dd-orth-2',
           'network': 'pine',
           'timestamp': '2021-01-11T11:02:39+00:00',
           'tower': 'DD',
           'type': 'ptp'}],
 'paging': {'limit': 100, 'offset': 0, 'total': 2}}

2. trunctuated output with with paging[‘total’] = 1,
response:

{'data': [{'ethernet': {'aux_interface': {'pkt_error': 0, 'rx': 0, 'tx': 0},
                        'link_loss': 77.19999694824219,
                        'main_psu_interface': {'pkt_error': 0,
                                               'rx': 59825.94,
                                               'tx': 931641.7},
                        'pcb_temperature': 36,
                        'rx_capacity': 23.540000915527344,
                        'rx_power': -53.20000076293945,
                        'sfp_interface': {'rx': 0, 'tx': 0},
                        'ssr': 0.10000000149011612,
                        'tx_power': 23,
                        'tx_throughput': 480.33,
                        'vector_error': -30.700000762939453},
           'mac': 'xx:xx:xx:xx:xx:xx',
           'managed_account': '',
           'mode': 'bhm',
           'name': 'dd-orth-1',
           'network': 'pine',
           'sm_count': 1,
           'timestamp': '2021-01-11T11:02:39+00:00',
           'tower': 'DD',
           'type': 'ptp'}],
 'paging': {'limit': 100, 'offset': 0, 'total': 1}}

3. and severly limited output with paging[‘total’] = 0

{'data': [], 'paging': {'limit': 100, 'offset': 0, 'total': 0}}

with response[‘data’] being null.

In the first example, where the data list has 2 elements, are those 2 elements from the same radio (are the MAC addresses the same)?

What URL are you accessing to get this data, and are you sending any parameters other than MAC address?

Thanks for looking at this Simon…I am sending start_time and stop_time as required.

https://x.x.x.x/api/v1/devices/{{mac_address}}/performance?start_time=2021-01-12T17:21&stop_time=2021-01-12T17:24

Which devices return the whole output differs each runtime???

As a side note, the only information I want “right now” is the receive signal level, but the GET[​/devices​/{mac}​/statistics] does not provide that information, nor the modulation rate, Receive Modulation Mode Detail, tx\rx\aggregate data rate. Is there a better API to use? I do not need historical data, but real-time.

You’d have to wait for someone from the cnMaestro team to reply to be sure, but I wonder if this is related to the timing of when cnMaestro collects the performance metrics from the device. Do you get consistent results for a given set of (mac_address, start_time, end_time) parameters, or does even that differ?

For real-time data, could you perhaps use SNMP direct to the device instead?

Hi ,

In API response, total refers to the number of performance records returned during the timestamp given. Also based on the given time range and MAC address in the query, responses and number of records will differ.

Also the real time data for parameters mentioned by you is not supported as part of statistics or any other API.

Thanks,
KR.

1 Like

For a given set of (mac_address, start_time, end_time) parameters, unfortunately, inconsistent. Run three times in quick succession, could possibly get 3 different replies per device. I am curious as to what is going on in the background that is causing this! Overdriving the server? SNMP fetch time intervals? I realize that the info could be provided over snmp…but was hoping for a stateless transfer of info over tcp/http. It seems that the cnmaestro api is more focused on wifi devices than PTP.

Hi ,

First of all sorry for the inconvenience caused to you with the PTP APIs. The APIs are developed to support both WiFi and Backhaul devices but for PTP less number of parameters are supported currently . We will be enhancing this and will be adding some more parameters in the upcoming releases. Please let us know which important parameters you want us to include so that the same can be taken care based on the feasibility.

Thanks,
KR.