Skip to main content

Hi All,


Need to fetch interface alias details of Fortinet firewalls from NQE query. Please help me to build the logic.

Need to include interface alias details(Fortinet firewalls), vlan interface details and interace ip assigned column in the below query.

In our environment there are WAN, INT interfaces on switches,routers and Fortinet Firewalls.For switches and routers we can see the details from the below query but  On Fortinet firewalls the vlan interfaces configured for the WAN INT Interfaces and the  description configured on interface alias. So also wants to include that interfaces details and interface ip details in the below ongoing query. 


pattern_interfaces = c"*WAN *","*WAN *”];

testPatterns(s, p) = 
max (foreach pattern in p
select matches(toLowerCase(s), toLowerCase(pattern)));

foreach device in network.devices
foreach interface in device.interfaces
let platform = device.platform
let ethernet = interface.ethernet
where isPresent(interface.description)
where interface.adminStatus == AdminStatus.UP
where testPatterns(interface.description, pattern_interfaces)
select {
  test: testPatterns(interface.description, pattern_interfaces),
  deviceName: device.name,
  Location: device.locationName,
  Tags: device.tagNames,
  Vendor: platform.vendor,
  Model: platform.model,
  interfaceName: interface.name,
  negotiatedSpeed: ethernet.negotiatedPortSpeed,
  negotiatedMode: ethernet.negotiatedDuplexMode,
  description: interface.description,
  operStatus: interface.operStatus,
  adminStatus: interface.adminStatus
}


@Nand , @RobertWelch did a whole post on Fortinet, see if this helps 

 

 


@GaryB , Thanks for replying and send the helpful post.

 

Can you please create a separate query for getting interface alias, vlan details for Fortinet firewalls and add condition for getting WAN, INT interfaces.


@GaryB , Any luck on this ?


Reply