SLA monitoring using the REST API
SLA log information and interface SLA information can be monitored using the REST API. This feature is also be used by FortiManager as part of its detailed SLA monitoring and drill-down features.
Interface log command example:
https://172.172.172.9/api/v2/monitor/virtual-wan/interface-log { "http_method":"GET", "results":[ { "interface":"port13", "logs":[ { "timestamp":1547087168, "tx_bandwidth":3447, "rx_bandwidth":3457, "bi_bandwidth":6904, "tx_bytes":748875, "rx_bytes":708799, "egress_queue":[ ] }, { "timestamp":1547087178, "tx_bandwidth":3364, "rx_bandwidth":3400, "bi_bandwidth":6764, "tx_bytes":753789, "rx_bytes":712835, "egress_queue":[ ] }, .... ....
SLA log command example:
https://172.172.172.9/api/v2/monitor/virtual-wan/sla-log { "http_method":"GET", "results":[ { "name":"ping", "interface":"spoke11-p1", "logs":[ { "timestamp":1614813142, "link":"up", "latency":0.13763333857059479, "jitter":0.02996666356921196, "packetloss":0 }, "child_intfs":{ "spoke11-p1_0":[ { "timestamp":1614813142, "link":"up", "latency":0.12413334846496582, "jitter":0.028366668149828911, "packetloss":0 }, { "name":"ping", "interface":"spoke12-p1", "logs":[ { "timestamp":1614813143, "link":"up", "latency":0.11373332887887955, "jitter":0.023099998012185097, "packetloss":0 }, "child_intfs":{ "spoke12-p1_0":[ { "timestamp":1614813143, "link":"up", "latency":0.0930333212018013, "jitter":0.011033335700631142, "packetloss":0 }, .... ....
Health check command example:
https://172.172.172.9/api/v2/monitor/virtual-wan/health-check { "http_method":"GET", "results":{ "ping":{ "spoke11-p1":{ "status":"up", "latency":0.13406667113304138, "jitter":0.023000005632638931, "packet_loss":0, "packet_sent":29722, "packet_received":29718, "sla_targets_met":[ 1 ], "session":2, "tx_bandwidth":1353, "rx_bandwidth":1536, "state_changed":1614798274, "child_intfs":{ "spoke11-p1_0":{ "status":"up", "latency":0.12929999828338623, "jitter":0.028200000524520874, "packet_loss":0, "packet_sent":29626, "packet_received":29625, "sla_targets_met":[ 1 ], "session":0, "tx_bandwidth":2608, "rx_bandwidth":1491, "state_changed":0 } } }, "spoke12-p1":{ "status":"up", "latency":0.11356667429208755, "jitter":0.015699999406933784, "packet_loss":0, "packet_sent":29722, "packet_received":29717, "sla_targets_met":[ 1 ], "session":2, "tx_bandwidth":1353, "rx_bandwidth":1536, "state_changed":1614798274, "child_intfs":{ "spoke12-p1_0":{ "status":"up", "latency":0.095466658473014832, "jitter":0.0092999991029500961, "packet_loss":0, "packet_sent":29687, "packet_received":29686, "sla_targets_met":[ 1 ], "session":0, "tx_bandwidth":1309, "rx_bandwidth":2553, "state_changed":0 } } } } }, .... ....
CLI diagnose commands:
# diagnose sys sdwan intf-sla-log port13 Timestamp: Wed Jan 9 18:33:49 2019, used inbandwidth: 3208bps, used outbandwidth: 3453bps, used bibandwidth: 6661bps, tx bytes: 947234bytes, rx bytes: 898622bytes. Timestamp: Wed Jan 9 18:33:59 2019, used inbandwidth: 3317bps, used outbandwidth: 3450bps, used bibandwidth: 6767bps, tx bytes: 951284bytes, rx bytes: 902937bytes. Timestamp: Wed Jan 9 18:34:09 2019, used inbandwidth: 3302bps, used outbandwidth: 3389bps, used bibandwidth: 6691bps, tx bytes: 956268bytes, rx bytes: 907114bytes. Timestamp: Wed Jan 9 18:34:19 2019, used inbandwidth: 3279bps, used outbandwidth: 3352bps, used bibandwidth: 6631bps, tx bytes: 958920bytes, rx bytes: 910793bytes. Timestamp: Wed Jan 9 18:34:29 2019, used inbandwidth: 3233bps, used outbandwidth: 3371bps, used bibandwidth: 6604bps, tx bytes: 964374bytes, rx bytes: 914854bytes. Timestamp: Wed Jan 9 18:34:39 2019, used inbandwidth: 3235bps, used outbandwidth: 3362bps, used bibandwidth: 6597bps, tx bytes: 968250bytes, rx bytes: 918846bytes. Timestamp: Wed Jan 9 18:34:49 2019, used inbandwidth: 3165bps, used outbandwidth: 3362bps, used bibandwidth: 6527bps, tx bytes: 972298bytes, rx bytes: 922724bytes. Timestamp: Wed Jan 9 18:34:59 2019, used inbandwidth: 3184bps, used outbandwidth: 3362bps, used bibandwidth: 6546bps, tx bytes: 977282bytes, rx bytes: 927019bytes.
# diagnose sys sdwan sla-log ping 1 spoke11-p1_0 Timestamp: Wed Mar 3 15:35:20 2021, vdom root, health-check ping, interface: spoke11-p1_0, status: up, latency: 0.135, jitter: 0.029, packet loss: 0.000%. # diagnose sys sdwan sla-log ping 2 spoke12-p1_0 Timestamp: Wed Mar 3 15:36:08 2021, vdom root, health-check ping, interface: spoke12-p1_0, status: up, latency: 0.095, jitter: 0.010, packet loss: 0.000%.
# diagnose sys sdwan health-check Health Check(ping): Seq(1 spoke11-p1): state(alive), packet-loss(0.000%) latency(0.156), jitter(0.043) sla_map=0x1 Seq(1 spoke11-p1_0): state(alive), packet-loss(0.000%) latency(0.128), jitter(0.024) sla_map=0x1 Seq(2 spoke12-p1): state(alive), packet-loss(0.000%) latency(0.125), jitter(0.028) sla_map=0x1 Seq(2 spoke12-p1_0): state(alive), packet-loss(0.000%) latency(0.093), jitter(0.008) sla_map=0x1