Skip to main content

I am trying to get an NQE scheduled to run every 5 mins. and fetch if an interface has any errors and/or if the interface utilization is high ( >90%).

With the below NQE i get an error as below - Any fields with bytes is not recognized..

ERROR: Record does not have field: "bytesOut".

 


interfaceUtilization(iface) = 100 * (sum(iface.bytesOut) - sum(iface.bytesIn)) / (sum(iface.bytesOut) + sum(iface.bytesIn));
foreach device in network.devices
foreach interface in device.interfaces
where interface.adminStatus == AdminStatus.UP
select {
deviceName: device.name,
interfaceName: interface.name,
utilization: interfaceUtilization(interface)
}

 

  1. Not sure why “bytes” is not recognized by the NQE
  2. How to have this scheduled to run every 5 mins ?

@venkat raj Maybe there is a misunderstanding here.  The NQE queries run against snapshot data.  Which means if you want the NQE query to be “run every 5 minutes” it means you would need to take a snapshot every 5 minutes.  You could probably achieve this with a subset of devices in a “workspace network”.  Most likely the Full network would not be able to run every 5 minutes.

What you are trying to do is more like our “Performance Data” feature.

https://fwd.app/docs/enterprise/applications/device_performance/

That is based on SNMP collections that can be run independently of a snapshot collection.

Another comment on “bytesOut”. We don’t parse the interface stats onto the data model.  You would need to use the state file parsing to parse out that data.


Reply