#!/bin/bash case $1 in config) echo "graph_category network" echo "graph_title Latency" echo "graph_args -l 0" echo "graph_vlabel ms" echo "graph_scale no" echo "latency.label Latency" echo "latency.type GAUGE" echo "latency.draw LINE1" echo "graph_info Graph of Internet Connection Latency" exit 0;; esac OUTPUT=$(jq .ping.latency speedtest.out) echo "latency.value $OUTPUT"