Using Device Search on AOS-CX

In the MultiEdit mode, the Contextual Search Engine allows you to filter a set of AOS-CX switches using search queries. The search queries can contain one or more search terms in the format, label:value. For example: model:6300F, where model is the label and 6300F is the value. When a search query contains a list of terms, by default, all terms are required to match. For example, the search query "model:8400 current-firmware:10.04.0001" will return only 8400 switches running 10.04.0001 firmware. The filtered switch details are displayed in the Devices table.

The search queries can contain the following information:

  • Device attributes—Attributes that denote the device details such as the model and current-firmware.
  • Wildcard characters—Asterisk (*) and question mark (?) are allowed in search queries.
  • Boolean operators—For complex queries, you can use the boolean operators AND, OR, NOT, + (the plus sign), and - (the minus sign).
  • Grouping characters—Multiple search terms with logical operators can be grouped using parenthesis ().

You must use quotes (" ") for any strings with spaces and for the default, running-config, and startup-config search. A default search is specified by entering quoted text instead of a label:value search term. The default search runs the search against the running configurations of the devices. For example, entering "ntp server172.16.0.100" searches for that string in the running configuration of all managed devices in the MultiEdit mode. Multiple search terms can be used in a query and can be combined using logical operators.

Searching for Devices

To access Contextual Search Engine and perform search, complete the following steps:

  1. In the Network Operations app, set the filter to a group containing at least one switch. The dashboard context for the group is displayed.
  2. Under Manage, click Devices > Switches.
  3. Click the Config icon to view the switch configuration dashboard.
  4. Slide the MultiEdit toggle switch to the on position to enable MultiEdit mode. The Devices table displays the list of devices in the selected group.
  5. Hover over the values in the table cells to view the labels that can be used in the search query. For example, if you hover over a cell in the Status column, a pop-up is displayed with the label that can be used in the search term and an example.
  6. In the Contextual Search Engine field, enter a search query, and click Search & Filter to filter a set of switches. The Devices table lists the devices that match the search query.

Figure 1  Device Search

Device Attributes

The following table lists the field names that can be used in the search query as device attributes.

Table 1: List of Field Names

Field Name

Definition

Example

active-image

Active image location 

active-image:primary

chassis

Name of the chassis if available

chassis:1

config-auto-commit

Configuration auto commit state

config-auto-commit:On

config-auto-commit:Off

config-failure-reasons

Reason for configuration failure when the configuration-state is "Not in sync"

config-failure-reasons:”Connection error”

config-failure-reasons:"Configuration conflicts"

config-failure-reasons:"Internal error"

config-failure-reasons:"Modified outside Central"

config-failure-reasons:"Initial group config pending"

config-failure-reasons:"Pushing config"

config-failure-reasons:"Connection error with pending changes"

config-failure-reasons:"Auto commit off"

configuration-state

Configuration sync state 

configuration-state:Sync

current-firmware

Current firmware version

current-firmware:10.02.0001

default-image

Default image location

default-image:secondary

fabric-card

Name of the fabric cards, if available

fabric-card:1\/1

firmware-version

Firmware version on the device

firmware-version:FL.10.1

hw-serial

Serial number of attached hardware

hw-serial:TW0989W

ip-address

Management IP address

ip-address:172.16.0.100

label

Label assigned to the device 

label:Floor1

last-sync-time

Last time when configuration in central and device are in sync

last-sync-time:2020-08-27

last-sync-time:2020-08-27T19

last-sync-time:2020-08-27T19:01:20Z

last-sync-time:[2020-08-27T19:01:20Z TO *]

last-sync-time:[2020-08-27 TO 2020-08-28]

last-sync-time:[2020-08-27T20 TO 2020-08-27T23]

last-sync-time:[2020-08-27T19:00:00 TO 2020-08-27T23:00:00]

last-sync-time:[2020-08-27T11:30:00Z TO 2020-08-27T23:00:00Z]

line-card

Name of the line cards, if available

line-card:1\/1

local-override

Device local override is enabled or not

local-override:Yes

local-override:No

mac-address

Base MACMedia Access Control. A MAC address is a unique identifier assigned to network interfaces for communications on a network. address

mac-address:e7c7dc-32f000

management-module

Name of the management module, if available

management-module:1\/1

manufacturer

Manufacturer name

manufacturer:Aruba

model

Model number

model:6300F

nae-status

NAE status of the switch 

nae-status:normal

name

The devices user-defined name

name:cx_6300F_ERIA000001

part-number

Product names of the device and attached hardware

part-number:JL635A

power-supply

Name of the power-supply, if available

power-supply:1\/1

primary-version

Primary image version

primary-version:GL.10.11

product-name 

Product names of the device and attached hardware

product-name:"8325 Mgmt Mod"

product-number

Product number of the device 

product-number:8325

running-config

Contents of the running configuration (this is the default search field)

running-config:”ospf”

running-config-modified

Date and time of latest running configuration change

running-config-modified:2020-08-27

running-config-modified:2020-08-27T19

running-config-modified:2020-08-27T19:01:20Z

running-config-modified:[2020-08-27T19:01:20Z TO *]

running-config-modified:[2020-08-27 TO 2020-08-28]

running-config-modified:[2020-08-27T20 TO 2020-08-27T23]

running-config-modified:[2020-08-27T19:00:00 TO 2020-08-27T23:00:00]

running-config-modified:[2020-08-27T11:30:00Z TO 2020-08-27T23:00:00Z]

running-deployed-by

User who deployed running configuration

running-deployed-by:system

secondary-version

Secondary image version 

secondary-version:GL.10.11

serial

Serial number

serial:SGIA000001

site

Site assigned to the device

site:”Santa Clara”

startup-config

Contents of the start-up configuration

startup-config:”ntp server 192.168.0.7”

startup-config-modified

Date and time of latest start-up configuration change

startup-config-modified:2020-08-27

startup-config-modified:2020-08-27T19

startup-config-modified:2020-08-27T19:01:20Z

startup-config-modified:[2020-08-27T19:01:20Z TO *]

startup-config-modified:[2020-08-27 TO 2020-08-28]

startup-config-modified:[2020-08-27T20 TO 2020-08-27T23]

startup-config-modified:[2020-08-27T19:00:00 TO 2020-08-27T23:00:00]

startup-config-modified:[2020-08-27T11:30:00Z TO 2020-08-27T23:00:00Z]

startup-deployed-by

User who deployed start-up configuration

startup-deployed-by:system

status

Device status

status:Online

status:Offline

system-contact

SNMPSimple Network Management Protocol. SNMP is a TCP/IP standard protocol for managing devices on IP networks. Devices that typically support SNMP include routers, switches, servers, workstations, printers, modem racks, and more. It is used mostly in network management systems to monitor network-attached devices for conditions that warrant administrative attention.  system contact

system-contact:JohnSmith

system-location

SNMP system location

system-location:Zurich

Wildcard Characters

Wildcard characters are used in search queries to match one or more other characters. The valid wildcard characters are asterisk (*) and question mark (?).

Use asterisk (*) to match multiple characters in a search query. For example, the search query Serial:SG* will return all the devices starting with SG, such as SG0010223, SG0110224, SG1110225, and so on.

Use question mark (?) to match a single character in a search query . For example, the search query Serial:SG001022? will return all the devices starting with SG001022 series replacing the last digit, such as SG0010221, SG0010222, SG0010223, and so on.

Search queries with wildcard characters must be used without quotes. For example: Serial:SG*.

Reserved Characters

Reserved characters are used for performing operations in search queries. For example, the plus (+) and minus (-) symbols are used as Boolean operators. Parenthesis () is used to group search queries. Reserved characters include + - && || ! ( ) { } [ ] ^ " ~ * ? : \.

If reserved characters appear in searches, then they must be preceded by an escape character such as a backslash (\). If the search terms are enclosed in quotes, then you need not add a backslash (\) before the reserved characters. For example, system-location:"santaclara(office)". If the search terms are not enclosed in quotes, then you must add a backslash (\) before the reserved characters. For example, system-location:santaclara\(office\).

Operators

The following table lists the operators that can be used in search queries.

Table 2: List of Operators

Operator

Example

Result

AND

model:8400 AND current-firmware:10.04.000

Returns all 8400 model switches running the 10.04.000 firmware version.

OR

model:8400 OR current-firmware:10.04.000

Returns all 8400 model switches, all the switches running 10.04.000 firmware version, or both.

NOT

model:8400 NOT current-firmware:10.04.000

Returns all 8400 model switches, but not switches running 10.04.000 firmware version.

+

(Includes)

model:8400 + running-config:"access-list ip hvac_segmentation"

Returns all 8400 model switches that contain the ACLAccess Control List. ACL is a common way of restricting certain types of traffic on a physical port. named "hvac_segmentation" in their running configuration.

-

(Excludes)

model:8400 - running-config:"access-list ip hvac_segmentation"

Returns 8400 model switches that do not have the ACL named "hvac_segmentation" in their running configuration.

( )

(Grouping)

 

(model:8400 OR model:6300) AND NOT current-firmware:10.04.0001

Returns all 8400 and 6300 model switches that are not running firmware version 10.04.000.

Sample Queries

The following table lists some sample queries that can be used as search queries.

Table 3: List of Sample Queries

Query

Result

"ospf"

Switches that contain the string "ospf" in their running configuration file.

model:8400 current-firmware:10.04.0001

Model 8400 switches running firmware version 10.04.0001.

model:8400 -current-firmware:10.04.0001

All 8400 switches that are not running version 10.04.0001.

(model:8400 OR model:6300) AND NOT current-firmware:10.04.0001

All 8400 and 6300 switches that are not running version 10.04.0001.

model:6300 -running-config:"access-list ip hvac_segmentation"

Model 6300 switches that do not have the ACL named "hvac_segmentation" in their running configuration.

hostname-AUS-05-.*

Devices with a hostname matching the regular expression. For example, in a deployment where host names are encoded as ( <site>-<building>-<floor>-<number>).

site:Aruba*

Devices with the Ssite name starting with Aruba.