Collect Fortigate metrics using API

hi all

currently, I’m monitoring my FortiGate using SNMP (telegraf,influxDB).
this is great and works just fine.
but there is some metrics that could be collected only via API (HTTP get).
for example, SD-WAN performance SLA.
it pings/HTTP to various destinations via each link and presents data for each link/destination of latency, jitter, packet loss.
I want to collect this data.
basically I need an input that will do HTTP get and prosses the JSON response from the FW. make a field/tag from latency, jitter, packet loss for each link.

is there any known input that is suitable for this task?

thanks :grinning:

just an API out example:

indent preformatted text by 4 spaces

{
“http_method”: “GET”,
“results”: {
“check_8.8.8.8”: {
“port27”: {
“status”: “up”,
“latency”: 54.729771,
“jitter”: 0.425666,
“packet_loss”: 0.000000,
“packet_sent”: 1244365.000000,
“packet_received”: 1237272.000000,
“session”: 10160,
“tx_bandwidth”: 15211828,
“rx_bandwidth”: 31507290,
“state_changed”: 1598956330
},
“port28”: {
“status”: “up”,
“latency”: 68.694794,
“jitter”: 0.020533,
“packet_loss”: 0.000000,
“packet_sent”: 1244365.000000,
“packet_received”: 1243031.000000,
“session”: 2,
“tx_bandwidth”: 6685,
“rx_bandwidth”: 20400,
“state_changed”: 1599024477
},
},
“check_cnn”: {
“port27”: {
“status”: “up”,
“latency”: 117.892006,
“jitter”: 5.740702,
“packet_loss”: 0.000000,
“packet_sent”: 1032819.000000,
“packet_received”: 1025886.000000,
“session”: 10160,
“tx_bandwidth”: 15211828,
“rx_bandwidth”: 31507290,
“state_changed”: 1598956330
},
“port28”: {
“status”: “up”,
“latency”: 147.146408,
“jitter”: 10.731600,
“packet_loss”: 0.000000,
“packet_sent”: 14674.000000,
“packet_received”: 14661.000000,
“session”: 2,
“tx_bandwidth”: 6685,
“rx_bandwidth”: 20400,
“state_changed”: 1599024477
},
}
},
indent preformatted text by 4 spaces

ok, found it.

work pretty straight forward.