Packet Broker generates reports to gain insight in how traffic is routed between networks.
The reports can be generated in JSON, CSV and Graphviz Dot format. In addition, the Graphviz Dot format can be rendered as PNG, SVG, PDF and PostScript images.
Get Routed Messages
You can get reports of routed messages over months, the last 30 days or today.
A report can be generated to see all traffic routed by a Forwarder, all traffic routed by a Home Network, between a specific Forwarder or Home Network, or by a network that acts both as Forwarder and Home Network.
To get a report of routed Forwarded traffic over some months in JSON or CSV:
$ pbctl report routed-messages --forwarder-net-id 000013 --forwarder-tenant-id tti \
--from 2021-05 --to 2021-11 \
--format json
$ pbctl report routed-messages --forwarder-net-id 000013 --forwarder-tenant-id tti \
--from 2021-05 --to 2021-11 \
--format csv
The CSV comes with a lot of columns for all possible errors. You might want to use
json
format instead.
Show JSON output
{
"to": "2021-12-08T00:00:00Z",
"forwarderNetId": 19,
"forwarderTenantId": "tti",
"homeNetworkNetId": 19,
"homeNetworkTenantId": "",
"uplink": {
"joinRequestsRoutedCount": "0",
"joinRequestsProcessedSuccessCount": "0",
"joinRequestsProcessedErrorCount": [],
"dataMessagesRoutedCount": "111",
"dataMessagesProcessedSuccessCount": "109",
"dataMessagesProcessedErrorCount": [
{
"errorType": "NOT_FOUND",
"count": "2"
}
]
},
"downlink": {
"joinAcceptsRoutedCount": "0",
"joinAcceptsProcessedSuccessCount": "0",
"joinAcceptsProcessedErrorCount": [],
"dataMessagesRoutedCount": "0",
"dataMessagesProcessedSuccessCount": "0",
"dataMessagesProcessedErrorCount": []
}
}{
"to": "2021-12-08T00:00:00Z",
"forwarderNetId": 19,
"forwarderTenantId": "tti",
"homeNetworkNetId": 19,
"homeNetworkTenantId": "sandbox",
"uplink": {
"joinRequestsRoutedCount": "0",
"joinRequestsProcessedSuccessCount": "0",
"joinRequestsProcessedErrorCount": [],
"dataMessagesRoutedCount": "0",
"dataMessagesProcessedSuccessCount": "0",
"dataMessagesProcessedErrorCount": []
},
"downlink": {
"joinAcceptsRoutedCount": "0",
"joinAcceptsProcessedSuccessCount": "0",
"joinAcceptsProcessedErrorCount": [],
"dataMessagesRoutedCount": "3",
"dataMessagesProcessedSuccessCount": "3",
"dataMessagesProcessedErrorCount": []
}
}{
"to": "2021-12-08T00:00:00Z",
"forwarderNetId": 19,
"forwarderTenantId": "tti",
"homeNetworkNetId": 19,
"homeNetworkTenantId": "ttn",
"uplink": {
"joinRequestsRoutedCount": "0",
"joinRequestsProcessedSuccessCount": "0",
"joinRequestsProcessedErrorCount": [],
"dataMessagesRoutedCount": "1",
"dataMessagesProcessedSuccessCount": "0",
"dataMessagesProcessedErrorCount": [
{
"errorType": "NOT_FOUND",
"count": "1"
}
]
},
"downlink": {
"joinAcceptsRoutedCount": "0",
"joinAcceptsProcessedSuccessCount": "0",
"joinAcceptsProcessedErrorCount": [],
"dataMessagesRoutedCount": "0",
"dataMessagesProcessedSuccessCount": "0",
"dataMessagesProcessedErrorCount": []
}
}
Show CSV output
date,forwarder_net_id,forwarder_tenant_id,forwarder_name,home_network_net_id,home_network_tenant_id,home_network_name,uplink_join_routed,uplink_join_processed_success,uplink_join_processed_error_internal,uplink_join_processed_error_no_home_network_endpoints,uplink_join_processed_error_not_found,uplink_join_processed_error_routing_policy,uplink_join_processed_error_unknown,uplink_data_routed,uplink_data_processed_success,uplink_data_processed_error_internal,uplink_data_processed_error_no_home_network_endpoints,uplink_data_processed_error_not_found,uplink_data_processed_error_routing_policy,uplink_data_processed_error_unknown,downlink_join_routed,downlink_join_processed_success,downlink_join_processed_error_collision_beacon,downlink_join_processed_error_collision_packet,downlink_join_processed_error_gateway_not_connected,downlink_join_processed_error_gps_unlocked,downlink_join_processed_error_internal,downlink_join_processed_error_routing_policy,downlink_join_processed_error_too_early,downlink_join_processed_error_too_late,downlink_join_processed_error_tx_frequency,downlink_join_processed_error_tx_power,downlink_join_processed_error_unknown,downlink_data_routed,downlink_data_processed_success,downlink_data_processed_error_collision_beacon,downlink_data_processed_error_collision_packet,downlink_data_processed_error_gateway_not_connected,downlink_data_processed_error_gps_unlocked,downlink_data_processed_error_internal,downlink_data_processed_error_routing_policy,downlink_data_processed_error_too_early,downlink_data_processed_error_too_late,downlink_data_processed_error_tx_frequency,downlink_data_processed_error_tx_power,downlink_data_processed_error_unknown
2021-12-08,000013,tti,TTI Internal,000013,,The Things Stack Cloud,0,0,0,0,0,0,0,110,108,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
2021-12-08,000013,tti,TTI Internal,000013,sandbox,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0
2021-12-08,000013,tti,TTI Internal,000013,ttn,The Things Network,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
To get a report of routed traffic over the past 30 days as SVG image:
$ pbctl report routed-messages --net-id 000013 --tenant-id tti --last-30d --format svg
Output:
For more options, see the flags:
$ pbctl report routed-messages --help