2.2. Search
2.2.1. Search Syntax
result-type: {criteria} [sortby sort_spec]
The following examples describe how search queries are used, and help you to understand how Red Hat Gluster Storage Console assists with building search queries.
Table 2.1. Example Search Queries
Example | Result |
---|---|
Volumes: status = up | Displays a list of all volumes that are up. |
Volumes: cluster = data | Displays a list of all volumes of the cluster data. |
Events: severity > normal sortby time | Displays the list of all events whose severity is higher than Normal, sorted by time. |
2.2.1.1. Auto-Completion
Volumes: status = down
Table 2.2. Example Search Queries using Auto-Completion
Input | List Items Displayed | Action |
---|---|---|
v | Volumes (1 option only) |
Select
Volumes or;
Type
Volumes
|
Volumes: |
All volumes properties
| Type s |
Volumes: s | volume properties starting with s | Select status or type status |
Volumes: status | =
!=
| Select or type |
Volumes: status = | All status values | Select or type down |
2.2.1.2. Result-Type Options
- Host for a list of hosts
- Event for a list of events
- Users for a list of users
- Cluster for a list of clusters
- Volumes for a list of volumes
2.2.1.3. Search Criteria
{criteria}
is as follows:
<prop> <operator> <value>
<obj-type>.<prop> <operator> <value>
The following table describes the parts of the syntax:
Table 2.3. Example Search Criteria
Part | Description | Values | Example | Note |
---|---|---|---|---|
prop | The property of the searched-for resource. Can also be the property of a resource type (see obj-type ), or tag (custom tag). | See the information for each of the search types in Section 2.2.1.3.1, “Wildcards and Multiple Criteria”. | Status | -- |
obj-type | A resource type that can be associated with the searched-for resource. | See the explanation of each of the search types in Section 2.2.1.3.1, “Wildcards and Multiple Criteria”. | Users | -- |
operator | Comparison operators. |
=
!= (not equal)
>
<
>=
<=
| -- | Value options depend on obj-type. |
Value | What the expression is being compared to. |
String
Integer
Ranking
Date (formatted according to regional settings)
|
Jones
256
normal
|
|
2.2.1.3.1. Wildcards and Multiple Criteria
<value>
part of the syntax for strings. For example, to find all users beginning with m, enter m*
.
AND
and OR
. For example:
Volumes: name = m* AND status = Up
AND
or OR
, AND
is implied. AND
precedes OR
, and OR
precedes implied AND
.
2.2.1.4. Determining Sort Order
sortby
. Sort direction (asc
for ascending, desc
for descending) can be included.
events: severity > normal sortby time desc