Skip to content

Instantly share code, notes, and snippets.

@dgarros
Last active May 28, 2019 16:41
Show Gist options
  • Save dgarros/37cd3d6efb8863972e235e98679982f7 to your computer and use it in GitHub Desktop.
Save dgarros/37cd3d6efb8863972e235e98679982f7 to your computer and use it in GitHub Desktop.
Influxdb Queries

Calculate the BPS per LAG from the absolute bytes counter from each interface.

SELECT SUM(bps) 
FROM ( 
     SELECT non_negative_derivative(max("input-bytes"), 1s) * 8 as bps 
     FROM  "jnpr_interface_stat" 
     WHERE ("interface" =~ /et/)  AND $timeFilter 
     GROUP BY time($interval), "device", "interface"
 ) 
GROUP BY time($interval), "parent"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment