File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -68,14 +68,14 @@ public function formatForInfluxDB2()
6868 'upload ' => (int ) $ this ->upload ,
6969 'download_bits ' => (int ) $ this ->download * 8 ,
7070 'upload_bits ' => (int ) $ this ->upload * 8 ,
71- 'ping_jitter ' => (float ) $ data ['ping ' ]['jitter ' ],
72- 'download_jitter ' => (float ) $ data ['download ' ]['latency ' ]['jitter ' ],
73- 'upload_jitter ' => (float ) $ data ['upload ' ]['latency ' ]['jitter ' ],
71+ 'ping_jitter ' => (float ) $ data ['ping ' ]['jitter ' ] ?? null ,
72+ 'download_jitter ' => (float ) $ data ['download ' ]['latency ' ]['jitter ' ] ?? null ,
73+ 'upload_jitter ' => (float ) $ data ['upload ' ]['latency ' ]['jitter ' ] ?? null ,
7474 'server_id ' => (int ) $ this ->server_id ,
7575 'server_host ' => $ this ->server_host ,
7676 'server_name ' => $ this ->server_name ,
7777 'scheduled ' => $ this ->scheduled ,
78- 'packet_loss ' => optional ( $ data) ['packetLoss ' ], // optional, because apparently the cli doesn't always have this metric
78+ 'packet_loss ' => ( float ) $ data ['packetLoss ' ] ?? null , // optional, because apparently the cli doesn't always have this metric
7979 ];
8080 }
8181}
You can’t perform that action at this time.
0 commit comments