bsmithio / OPNsense-Dashboard

A functional and useful dashboard for OPNsense that utilizes InfluxDB, Grafana, Graylog, and Telegraf.
554 stars 69 forks source link

Gateway RTT - ALL - Data seems unrealistic #79

Open cypherstream opened 4 days ago

cypherstream commented 4 days ago

I assume the graph for Gateway RTT - ALL and Gateway Loss - ALL is getting data from PING times to the next gateway, and if theres are missed pings it should alter the Gateway loss value.

What I am struggling with is the Gateway RTT - ALL data seems unrealistic. I can ping my next gateway and get ping times between 7ms and 12 ms, but this graph is showing a mean of 391 ms, a max of 2.48 SECONDS (this is obviously fluctuating in real time and way off).

Before I switched to OPNsense, I used pfSense and an older version of grafana (7.x) and a different repo correctly pulled not only the gateway pings, but I could customize and add more (like google ,1.1.1.1) and also showed Jitter. The values on that dashboard/grafana/pfsense combination were realistic and in line with real network testing.

I'm not sure how this is calculated on THIS dashboard and with OPNsense, but it certainly seems way off.

Screenshot 2024-11-20 at 12 13 03 PM Screenshot 2024-11-20 at 12 17 46 PM
cypherstream commented 1 day ago

I added ping in OPNsense telegraf config and added a few ips to ping. Allowed telegraf to run as root, then restarted the telegraf service. Now ping statistics are pushed into InfluxDB.

Next I completely edited the queries for these two. Gateway RTT - ALL is now set to Influxdb datasource and the query: from(bucket: "bucket1") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "ping") |> filter(fn: (r) => r["_field"] == "average_response_ms") |> filter(fn: (r) => r["host"] == "OPNsense.home.arpa") |> filter(fn: (r) => r["url"] == "10.71.0.1") |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false) |> yield(name: "mean")

Gateway loss - ALL is now set to Influxdb and its query set to: from(bucket: "bucket1") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "ping") |> filter(fn: (r) => r["_field"] == "percent_packet_loss") |> filter(fn: (r) => r["host"] == "OPNsense.home.arpa") |> filter(fn: (r) => r["url"] == "10.71.0.1") |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false) |> yield(name: "mean")

Obviously set the host and URL to something relevant to your install.

Screenshot 2024-11-23 at 7 40 24 PM
cypherstream commented 1 day ago

Because of adding the ping option in OPNsense telegraf input and adding 3 IP's to ping, I was also able to add another panel like so. You could customize the IPs pinged. Possibilities are pretty open with this! The only thing left for me to do is try to figure out how to pretty up the legend.

Screenshot 2024-11-23 at 7 45 42 PM Screenshot 2024-11-23 at 7 47 46 PM