Skip to main content

 

Join Mike on a journey to introduce a feature of the Forward Enterprise platform called the Network Query Engine (A.K.A NQE) and why it will make your job as a network or security operator much easier.   Let us know what you think about NQE; what do you see yourself using it for?  If you have any questions ask them below 👇🏻

 

Code example used in video

Return a violation if an interface on a Cisco IOS XE device is administratively up but operationally down

foreach device in network.devices
foreach interface in device.interfaces
where device.platform.os == OS.IOS_XE
select {
deviceName: device.name,
interfaceName: interface.name,
adminStatus: interface.adminStatus,
operStatus: interface.operStatus,
violation: interface.adminStatus == AdminStatus.UP &&
interface.operStatus != OperStatus.UP
}

 

Thanks - I am not sure what “Column” you are referring too and struggling to understand what you mean when you say pull from data model. Feel like I need a more basic video that this lol. 


@Si_Price When I say column in the video, I am referring what the column headers are going to be named.  If we break down a select statement,

foreach device in network.devices

select {
"Device Name": device.name
}

In the select statement it gives the column a name and what values you want returned from the data model. Looking at the simple NQE query above, “Device Name” is the column name, and to the right of the colon, we are accessing the part of the data model that contains the device names from the collected network to return in our query. Typically, you want the column header to be descriptive of what you will return to that column but it can be named whatever you want it to be named.

The data model organizes and structures the data collected from the network in a hierarchy. This searchable model can help you write a query for data you want to return from the collected network. Think of the data model as a tree you want to climb. You know the branch you want to go to, and looking at the tree, you know how to navigate to the specific branch. Looking at the hierarchy of how data is organized is similar to the tree-climbing analogy, and this is where the data model explorer comes in to help climb that tree as it will help visualize what the hierarchy of the data is.  The data model explorer is located to the right of the NQE editor in the NQE library.  

There is a video called navigating the NQE library that can be found here

 


Reply