Chapter 2. 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.
2.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 2.2, “Using Free Text Search”.
2.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 Section 2.1.2, “Operators”. For descriptions of value formats, see Section 2.1.3, “Values”.
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.
Table 2.1. Comparison Operators Accepted by Search
|=||EQUALS||Accepts numerical, temporal, or text values. For text, exact case sensitive matches are returned.|| |
|~||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%|| |
|>||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: >= <=|| |
The search will return hosts that have been registered after the given date, that is, between 10th January 2017 and now.
The search will return hosts that have been registered yesterday or earlier.
|^||IN||Compares an expression against a list of values, as in SQL. Returns matches that contain or not contain the values, respectively.|| |
|HAS||Returns values that are present or not present, respectively.|| |
On the Puppet Classes page, the search will return classes that are assigned to at least one host group.
On the Dashboard with an overview of hosts, the search will return all hosts that have no assigned host group.
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:
Table 2.2. Logical Operators Accepted by Search
- 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 serversThe 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"
- "January 10, 2017"
- Today, Yesterday, and the like.
WarningAvoid ambiguous date formats, such as 02/10/2017 or 10-02-2017.