95th percentile caculations for Grafana and InfluxDB - Thu, Dec 3, 2020
95th percentile caculations for Grafana and InfluxDB
Just wanted to throw this together before I forgot…
SELECT PERCENTILE("derivative",95) FROM (SELECT derivative(sum("ifHCInOctets"), 1s)*8 FROM "snmp" WHERE ("ifName" = 'ethernet1/3/1' OR "ifName" = 'ethernet2/3/1') AND $timeFilter GROUP BY time(10s))
I have 10second snmp dumps from the switches in my colocation for bandwidth to Influxdb via Telegraf. This was done at such a high rate to try to simulate filling up space faster… anyway
This finds the 95th percentile in Mib/s. You can set the time filter to be 30 days, 7 days, just the last 6 hours, whatever you want, and it should build your data out how you want it.