Skip to content

Instantly share code, notes, and snippets.

@thepacketgeek
Created November 24, 2020 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thepacketgeek/24dc4665cc4045d730ca032ed4b8aaa1 to your computer and use it in GitHub Desktop.
Save thepacketgeek/24dc4665cc4045d730ca032ed4b8aaa1 to your computer and use it in GitHub Desktop.
Influx Query for showing delta of cumulative iface counts
SELECT
non_negative_derivative(mean("ifHCInOctets"), 1s) * 8 AS "Rx",
non_negative_derivative(mean("ifHCOutOctets"), 1s) * 8 AS "Tx"
FROM "interface"
WHERE ("ifAlias" = 'Some if here')
AND $timeFilter GROUP BY time($__interval) fill(null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment