Chapter 4. Searching and Bookmarking
The Satellite web UI features powerful search functionality which is available on most pages of the web UI. It enables you to search all kinds of resources that Satellite Server manages. Searches accept both free text and syntax-based queries, which can be built using extensive input prediction. Search queries can be saved as bookmarks for future reuse.
4.1. Building Search Queries
As you start typing a search query, a list of valid options to complete the current part of the query appears. You can either select an option from the list and keep building the query using the prediction, or continue typing. To learn how free text is interpreted by the search engine, see Section 4.2, “Using Free Text Search”.
4.1.1. Query Syntax
parameter operator value
Available fields, resources to search, and the way the query is interpreted all depend on context, that is, the page where you perform the search. For example, the field "hostgroup" on the Hosts page is equivalent to the field "name" on the Host Groups page. The field type also determines available operators and accepted values. For a list of all operators, see Operators. For descriptions of value formats, see Values.
4.1.2. Operators
All operators that can be used between parameter and value are listed in the following table. Other symbols and special characters that might appear in a prediction-built query, such as colons, do not have special meaning and are treated as free text.
Operator | Short Name | Description | Example |
---|---|---|---|
= | EQUALS | Accepts numerical, temporal, or text values. For text, exact case sensitive matches are returned. |
|
!= | NOT EQUALS | ||
~ | LIKE | Accepts text or temporal values. Returns case insensitive matches. Accepts the following wildcards: _ for a single character, % or * for any number of characters including zero. If no wildcard is specified, the string is treated as if surrounded by wildcards: %rhel7% |
|
!~ | NOT LIKE | ||
> | GREATER THAN | Accepts numerical or temporal values. For temporal values, the operator > is interpreted as "later than", and < as "earlier than". Both operators can be combined with EQUALS: >= <= |
|
< | LESS THAN | ||
^ | IN | Compares an expression against a list of values, as in SQL. Returns matches that contain or not contain the values, respectively. |
|
!^ | NOT IN | ||
HAS or set? |
| Returns values that are present or not present, respectively. |
|
NOT HAS or null? |
|
Simple queries that follow the described syntax can be combined into more complex ones using logical operators AND, OR, and NOT. Alternative notations of the operators are also accepted:
Operator | Alternative Notations | Example | ||
---|---|---|---|---|
and | & | && | <whitespace> |
|
or | | | || |
|
|
not | – | ! |
|
|
4.1.3. Values
- Text Values
Text containing whitespaces must be enclosed in quotes. A whitespace is otherwise interpreted as the AND operator.
Examples:
hostgroup = "Web servers"
The search will return hosts with assigned host group named "Web servers".
hostgroup = Web servers
The search will return hosts in the host group Web with any field matching %servers%.
- Temporal Values
Many date and time formats are accepted, including the following:
- "10 January 2017"
- "10 Jan 2017"
- 10-January-2017
- 10/January/2017
- "January 10, 2017"
- Today, Yesterday, and the like.
Avoid ambiguous date formats, such as 02/10/2017 or 10-02-2017.
4.2. Using Free Text Search
When you enter free text, it will be searched for across multiple fields. For example, if you type "64", the search will return all hosts that have that number in their name, IP address, MAC address, and architecture.
Multi-word queries must be enclosed in quotes, otherwise the whitespace is interpreted as the AND operator.
Because of searching across all fields, free text search results are not very accurate and searching can be slow, especially on a large number of hosts. For this reason, we recommend that you avoid free text and use more specific, syntax-based queries whenever possible.
4.3. Managing Bookmarks
You can save search queries as bookmarks for reuse. You can also delete or modify a bookmark.
Bookmarks appear only on the page on which they were created. On some pages, there are default bookmarks available for the common searches, for example, all active
or disabled
hosts.
4.3.1. Creating Bookmarks
This section details how to save a search query as a bookmark. You must save the search query on the relevant page to create a bookmark for that page, for example, saving a host related search query on the Hosts page.
To Create a Bookmark:
- Navigate to the page where you want to create a bookmark.
- In the Search field, enter the search query you want to save.
- Select the arrow to the right of the Search button and then select Bookmark this search.
- In the Name field, enter a name for the new bookmark.
- In the Search query field, ensure your search query is correct.
Ensure the Public check box is set correctly:
- Select the Public check box to set the bookmark as public and visible to all users.
- Clear the Public check box to set the bookmark as private and only visible to the user who created it.
- Click Submit.
To confirm the creation, either select the arrow to the right of the Search button to display the list of bookmarks, or navigate to Administer > Bookmarks and then check the Bookmarks list for the name of the bookmark.
4.3.2. Deleting Bookmarks
You can delete bookmarks on the Bookmarks page.
To Delete a Bookmark:
- Navigate to Administer > Bookmarks.
- On the Bookmarks page, click Delete for the Bookmark you want to delete.
- When the confirmation window opens, click OK to confirm the deletion.
To confirm the deletion, check the Bookmarks list for the name of the bookmark.