Search Nodes

You can navigate to Node Management > Search Nodes to display information about the Nodes which have been already validated, and are managed by Rudder.

Quick search

You might have noticed the small text area at the top of the Rudder interface: it is the Quick Search bar. Its purpose is to enable a user to easily search for Rudder elements (Nodes, Groups, Directives, Parameters, Rules) based on their name, id, description, inventory…

Quicksearch

An autocompletion list will appear as soon as Rudder detects an element it can identify, you just have to click on it to be redirected to the element configuration page.

More complex search queries can be input using the "in:" and "is:" keywords, "is" targets Rudder objects by type, and "in" targets elements like name, description…

Those keywords are used to refine a research in case a search query returns too many results.

The available search keywords are:

Table 3. is: keywords

keyword Description

node

Nodes

group

Groups

parameter

Parameters

directive

Directives

rule

Rules



Table 4. in: keywords (common)

keyword Search for

name

Names

id

IDs

description, long_description

Descriptions

enabled

Enabled elements (true or false)



Table 5. in: keywords (nodes)

keyword Search for

hostname

Hostnames

os_type

OS types (windows, linux, aix…)

os_name

OS Names (Windows Server 2012, Debian… )

os_version

OS versions (8, 2008 R2, …)

os

OS Full Names (Debian GNU/Linux 6.0.10 (squeeze)…)

os_kernel_version

OS Kernel versions (3.16, 5.1…)

os_service_pack

OS Service Packs (for Windows and SuSE Linux)

architecture

OS Architectures (amd64, x86_64, i386)

ram

Machine memory

ips

Network IP addresses

policy_server_id

ID of a node’s policy server (root…)

properties

Node properties (arbitrary key=values associated to a node)

rudder_roles

Rudder roles (rudder-reports, rudder-ldap…)



Table 6. in: keywords (groups)

keyword Search for

dynamic

Dynamic groups



Table 7. in: keywords (directives)

keyword Search for

dir_param_name

Directive parameter names, as in the Techniques metadata.xml ("GENERIC_FILE_CONTENT_PATH"…)

dir_param_value

Directive parameter values

technique_id

Technique IDs

technique_name

Technique names ("Enforce a file content"…)

technique_version

Technique version



Table 8. in: keywords (parameters)

keyword Search for

parameter_name

Parameter names

parameter_value

Parameter values



Table 9. in: keywords (rules)

keyword Search for

directives

Rules containing those Directive IDs

groups

Rules containing those Group IDs



Example 2. Example: Search for a Node called debian-node

Assuming you have one managed Node called debian-node.rudder-project.org, whose ID in Rudder is d06b1c6c-f59b-4e5e-8049-d55f769ac33f.

  1. Type in the Quick Search field the de or d0.
  2. The search result will return this Node: debian-node.rudder-project.org — d06b1c6c-f59b-4e5e-8049-d55f769ac33f [d06b1c6c-f59b-4e5e-8049-d55f769ac33f].


Example 3. Example: Search for a directive called Common users

Assuming you have one Directive called Common users, whose ID in Rudder is 6e8ce05b-3f77-4fed-a424-edf0fdaa4231.

  1. Type in the Quick Search field is:directive common.
  2. The search result will return this Directive: Common users — 4a6aaea7-6471-4ca9-8c27-9ee9f44ed882 [6e8ce05b-3f77-4fed-a424-edf0fdaa4231].


[Tip]Tip

This feature is enabled by default on new installations of Rudder from the following versions:

  • 3.1.14
  • 3.2.7
  • 4.0.0

and may be enabled after an upgrade of a Rudder installation in the Settings tab.

Advanced Search

In the Advanced Search tool, you can create complex searches based on Node Inventory information. The benefit of the Advanced Search tool is to save the query and create a Group of Nodes based on the search criteria.

  • 1. Select a field

The selection of the field upon which the criteria will apply is a two step process. The list of fields is not displayed unordered and extensively. Fields have been grouped in the same way they are displayed when you look at information about a Node. First you choose among these groups: Node, Network Interface, Filesystem, Machine, RAM, Storage, BIOS, Controller, Port, Processor, Sound Card, Video Card, Software, Environment Variable, Processes, Virtual Machines; then you choose among the list of fields concerning this theme.

  • 2. Select the matching rule

The matching rule can be selected between following possibilities: Is defined, Is not defined, =, ≠ or Regex followed by the term you are searching for presence or absence. Depending on the field, the list of searchable terms is either an free text field, either the list of available terms.

  • a. Regex matching rule

You can use regular expressions to find whatever you want in Node inventories. A search request using a regexp will look for every node that match the pattern you entered.

Those regexps follow Java Pattern rules. See http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html for more details.

Example 4. Search node having an ip address matching 192.168.x.y

Assuming you want to search every node using an ip address match 192.168.x.y, where x<10 and y could be everything. You will to add that line to your search request:

  • Node summary, Ip address, Regex, 192\ .168\ .\d\ . .*


  • b. Composite search

Some fields allow you to look for more than one piece of information at a time. That’s the case for environment variable. For those fields you have to enter the first element then the separator then following elements. The name of the fields tells you about what is expected. It would look like firstelement<sep>secondelement assuming that <sep> is the separator.

Example 5. Search Environment Variable LANG=C.

Assuming you want to search every node having the environment variable LANG set to C. You will have to add that search line to your request:

  • Environment variable, key=value, =, LANG=C.


  • 3. Add another rule

You can select only one term for each matching rule. If you want to create more complex search, then you can add another rule using the + icon. All rules are using the same operand, either AND or OR. More complex searches mixing AND and OR operands are not available at the moment.

Example 6. Advanced search for Linux Nodes with ssh.

Assuming you want to search all Linux Nodes having ssh installed. You will create this 2 lines request:

  1. Operator: AND.
  2. First search line: Node, Operating System, =, Linux.
  3. Second search line: Software, Name, =, ssh.