I'm looking to define a query that allows me to query the Network Interface for all my machines and create a percentage utilization for each interface. I'm having a bit of trouble with it though.
What I'm ultimately looking for is to take the TotalBytes being used on my Network Interface and divide by my current bandwidth. Basically: ((totalBytes*8)/CurrentBandwidth) * 100
I've come up with the following query but CurrentBandwidth doesn't come back with anything and I get an error that I'm interpreting to me an I'm dividing by zero.
index=index host=host object="Network Interface" counter="Bytes Total/sec"
| bucket _time span=1m
| stats avg(Value) as bytesByHost by _time,host
| stats sum(bytesByHost) as totalBytes by _time
| append [search index=index host=host object="Network Interface" counter="Current Bandwidth" instance!="isatap.*"
| bucket _time span=1m
| stats avg(Value) as connsByHost by _time | stats sum(connsByHost) as CurrentBandwidth by _time ]
| stats exact(((totalBytes*8)/CurrentBandwidth) * 100)
Error: Error in 'stats' command: The argument 'exact(((totalBytes*8)/CurrentBandwidth) * 100)' is invalid.
Any assistance would be greatly appreciated.
... View more