Chapter 19. Searching and bookmarking Satellite features powerful search functionality on most pages of the Satellite web UI. It enables you to search all kinds of resources that Satellite manages. Searches accept both free text and syntax-based queries, which can be built by using input prediction. Search queries can be saved as bookmarks for future reuse. 19.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 by using the prediction, or continue typing. To learn how free text is interpreted by the search engine, see Section 19.2, "Using free text search" . 19.1.1. Query syntax 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 . 19.1.2. Query 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. Table 19.1. Comparison operators accepted by search Operator Short Name Description Example = EQUALS Accepts numerical, temporal, or text values. For text, exact case sensitive matches are returned. hostgroup = RHEL7 != 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% hostgroup ~ rhel% !~ 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: >= <= registered_at > 10-January-2017 The search will return hosts that have been registered after the given date, that is, between 10th January 2017 and now. registered_at <= Yesterday The search will return hosts that have been registered yesterday or earlier. < LESS THAN ^ IN Compares an expression against a list of values, as in SQL. Returns matches that contain or not contain the values, respectively. release_version !^ 7 !^ NOT IN HAS or set? Returns values that are present or not present, respectively. has hostgroup or set? hostgroup On the Puppet Classes page, the search will return classes that are assigned to at least one host group. not has hostgroup or null? hostgroup On the Dashboard with an overview of hosts, the search will return all hosts that have no assigned host group. 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: Table 19.2. Logical operators accepted by search Operator Alternative Notations Example and & && <whitespace> class = motd AND environment ~ production or | || errata_status = errata_needed || errata_status = security_needed not - ! hostgroup ~ rhel7 not status.failed 19.1.3. Query 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. Warning Avoid ambiguous date formats, such as 02/10/2017 or 10-02-2017. 19.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. Note 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. 19.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. 19.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. Procedure In the Satellite web UI, 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 checkbox is set correctly: Select the Public checkbox to set the bookmark as public and visible to all users. Clear the Public checkbox 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. 19.3.2. Deleting bookmarks You can delete bookmarks on the Bookmarks page. Procedure In the Satellite web UI, 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. 19.4. Using keyboard shortcuts You can use keyboard shortcuts to quickly focus search bars. To focus the vertical navigation search bar, press Ctrl + Shift + F . To focus the page search bar, press / .

Commands:
parameter operator value