Man pages

rudder(8)

NAME

rudder - execute commands to control the Rudder configuration management tool.

SYNOPSIS

rudder component [-h] [-i|-v|-d] command

rudder component help

DESCRIPTION

A tool to trigger actions or get information about a running rudder-agent, whether on agent or server. It only targets administration actions, for all node configuration tasks you can use the rudder-cli tool.

OPTIONS

-h

Print command-line syntax and command options.

-i

Print general information.

-v

Print detailed information.

-d

Print all available information.

-c

Do not colorize output.

COMMANDS

The commands below are listed by component.

agent

commands for rudder agent, run with rudder agent command

check

check if rudder agent has no problem and is running properly. Check that rudder agent is working properly.

  • generate missing UUID

  • kill cfengine if there are too many processes

  • run cfengine if its daemon is missing

  • clean lock file if it is too big

  • check and restore init files

  • check that promises have been properly copied

  • will sleep a random time (max half the run interval) when not run in interactive mode prior checking agent

    Options:

    -q: run the agent in quiet mode (display only error messages)

    -c: run the agent without color output

    -f: prevent sleeping in non-interactive mode

    -u: only check the uuid existence.

diff

show diff between current file and the one before agent modification. This command will output file change in a diff format

Options:

-l: show diff from the given backup

-n: show diff from the nth backup before the last one

-d: show diff from a given date in the date command format (man date for details)

filename: the file to show diff from

disable

forbid rudder-agent to be run by cron or service. This is useful when you want to temporarily prevent your Rudder agent from doing any modification to your system.

Options:

-s: stop rudder-agent in addition to disabling it

-q: run the agent in quiet mode (display only error messages)

-c: run the agent without color output

enable

re-enable a disabled rudder-agent.

Options:

-s: start rudder-agent in addition to enabling it

-q: run the agent in quiet mode (display only error messages)

-c: run the agent without color output

factory-reset

re-initialise the agent to make it be seen as a new node on the server. This command will delete all local agent data, including its uuid and keys, and also reset the agent internal state. The only configuration kept is the server hostname or ip configured in policy_server.dat. It will also send an inventory to the server, which will treat it as a new node inventory.

WARNING: This command will permanently delete your node uuid and keys, and no configuration will be applied before re-accepting and configuring the node on the server.

Options:

-f: force the reinitialization without asking for confirmation

-i: run the agent in information mode, prints basic information

-v: run the agent in verbose mode, prints detailed information

-d: run the agent in debug mode, prints low-level information

-q: run the agent in quiet mode (display only error messages)

-w: show full strings, never cut output

-c: run the agent without color output

-T: display timing information

-r: run the agent with raw output

-R: run the agent in completely unparsed mode, with no return code of 1 in case of error. A little faster.

health

monitor agent health. Check that rudder agent has no problem

Options:

-n: run in nrpe mode, print a single line and return 0,1 or 2 put this line in your nrpe.cfg to use it command[check_rudder]=/opt/rudder/bin/rudder agent health -n

history

read log of old agent runs. This command will output historic logs of agent runs.

Options:

-c: show history without color output

-n: show maximum n lines of history

info

display a summary of agent information. Outputs detailed information about the agent configuration, especially what defines the node (hostname, uuid and key hash) and its policy server.

Options:

-v: run the agent in verbose mode, prints detailed information

inventory

force the agent to create and send a new inventory. This will trigger a new inventory creation and send it to the policy server. Even if the agent will do it regularly, it can be used to force the update after a modification on the node. This won’t affect the node state, but only update server-side information.

Options:

-i: run the agent in information mode, prints basic information

-v: run the agent in verbose mode, prints detailed information

-d: run the agent in debug mode, prints low-level information

-q: run the agent in quiet mode (display only error messages)

-w: show full strings, never cut output

-c: run the agent without color output

-T: display timing information

-r: run the agent with raw output

-R: run the agent in completely unparsed mode, with no return code of 1 in case of error. A little faster.

-f: run the agent even if it is disabled

log

read log of old agent runs. This command will output historic logs of agent runs.

Options:

-w: show full strings, never cut output

-c: show log without color output

-r: show log with raw output

-R: show log in completely unparsed mode, with no return code of 1 in case of error. A little faster.

-l: show log from the given file

-n: show log from the nth run before the last one

-d: show log from a given date in the date command format (man date for details)

reinit

alias of command "rudder agent factory-reset". This command is a wrapper for "rudder agent factory-reset", that has replaced it.

reset

reset agent status and cache. Remove all locks and state cache of the agent, and restore initial promises. This won’t affect the desired state of the node, but will only reset the internal state of the agent. It is useful to test a rule without caching interference or when you have trouble with the promises updates, and is in most cases sufficient to resolve issues.

To completely reinitialize the agent and make it appear as a new node again, please use "rudder agent factory-reset" instead.

Options:

-i: run the agent in information mode, prints basic information

-q: run the agent in quiet mode (display only error messages)

-c: run the agent without color output

run

force run agent promises. This command will force the agent to enforce current policies. You can run rudder agent update before to update the promises.

Options:

-u: update policy before running the agent (default is to run existing policy)

-i: run the agent in information mode, prints basic information

-v: run the agent in verbose mode, prints detailed information

-d: run the agent in debug mode, prints low-level information

-q: run the agent in quiet mode (display only error messages)

-g: run the agent in full compliance mode (even if change only has been configured)

-w: show full strings, never cut output

-c: run the agent without color output

-T: display timing information

-r: run the agent with raw output

-R: run the agent in completely unparsed mode, with no return code of 1 in case of error. A little faster.

-b: run the agent on a specific bundle, this is a debug command that should generally not be used

-D: define a class for this run

-f: run the agent even if it is disabled

start

start the agent. Start the agent service using the appropriate service manager.

Options:

-q: run the agent in quiet mode (display only error messages)

-c: run the agent without color output

status

show the agent status.
Options:

-q: run the agent in quiet mode (display only error messages)

-c: run the agent without color output

stop

stop the agent. Stop the agent service using the appropriate service manager.

Options:

-q: run the agent in quiet mode (display only error messages)

-c: run the agent without color output

update

update promises on agent. The agent will fetch the last version of its promises from its configured policy server.

Options:

-i: run the agent in information mode, prints basic information

-v: run the agent in verbose mode, prints detailed information

-d: run the agent in debug mode, prints low-level information

-q: run the agent in quiet mode (display only error messages)

-c: run the agent without color output

-f: force full update

version

get the agent version. Displays the version of the Rudder agent and of the underlying CFEngine agent.

remote

commands for rudder remote, run with rudder remote command

run

trigger the execution of a remote agent. This command allows to override the agent run schedule and to immediately update the promises and enforce them on th specified node. This command is currently only allowed from the policy server of the target node.

Arguments:

node: IP or hostname of the target node or 'all' for all nodes of the server

Options:

-i: run the agent in information mode, prints basic information

-v: run the agent in verbose mode, prints detailed information

-d: run the agent in debug mode, prints low-level information

-q: run the agent in quiet mode (display only error messages)

-w: show full strings, never cut output

-c: run the agent without color output

-T: display timing information

-r: run the agent with raw output

-R: run the agent in completely unparsed mode, with no return code of 1 in case of error. A little faster.

-D: define a class for this run

-a: run the agent on all known nodes

-g: run the agent on all nodes of the group UUID given in parameter

-j: run this number of jobs in parallel

-t: provide an alternate token for group query (default from ~/.rudder)

-u: provide an alternate url for group query (default from ~/.rudder)

-C: provide an alternate config section in ~/.rudder for group query (default to first found)

server

commands for rudder server, run with rudder server command

debug

run a debug cf-serverd intended for a specific node. This command targets a specific node and does not affect the running infrastructure. It uses iptables to redirect the specific node communications to the port the debug server is listening on (5310 by default).

Use Ctrl+C to stop the debug server.

Arguments:

-e: debug the cfengine enterprise server

-i: run a debug server for the given node

node: IP or hostname of the host you want to debug

directive-migrate-package

create a new package directive based on an out-to-date package directive.. create a new package directive based on an out-to-date package directive.

Out-to-date package techniques are {"aptPackageInstallation", "rpmPackageInstallation"}. Not all of the options present in the old package techniques are still available. The script will stop and do nothing if one parameter is not translatable.

If the script succeed, it will create a new directive, without rule assignement and the old directive will not be changed to ensure human verification on the parameters translation.

Arguments:

-o: old directive id

-c: raw color mode, all output are non-colored text

-i: verbose mode, display more detailed informations of the execution

directive-replace

replace a directive occurence in all the Rudder rules by another directive.. replace a directive occurence in all the Rudder rules by another directive.

Arguments:

-o: old directive id

-n: new directive id

-c: raw color mode, all output are non-colored text

-i: verbose mode, display more detailed informations of the execution

directive-upgrade

Upgrade directives to use latest technique version available. This command will migrate directives based on a given technique to the given version. If the directive version cannot be changed for any reason, the directive is skipped.

Options:

-v: run in verbose mode, prints detailed information

-n: upgrade directves based on given technique (mandatory)

-c: run without colors

-V: migrate to given version

disable-policy-distribution

Stop Rudder from distributing new policies as a server. This is useful when you want to temporarily prevent your Rudder server from doing any changes on your agents

enable-policy-distribution

Re-enable Rudder to distribute new policies as a server. This is useful after you have run "rudder server disable-policy-distribution" to allow the agent to restart the policy server. This will restart the policy server immediately.

health

monitor server health. Check that rudder agent has no problem

Options:

-w: wait for the service to be up (if you just started the server)

-n: run in nrpe mode, print a single line and return 0,1 or 2 put this line in your nrpe.cfg to use it command[check_rudder_server]=/opt/rudder/bin/rudder server health -n

reload-groups

reload dynamic groups. By default, dynamic groups are evaluated every 5 minutes. This command triggers a reload of all dynamic groups.

Options:

-i: run the agent in information mode, displays all executed commands

-c: run the agent without color output

reload-techniques

reload techniques. This command will reload the technique library into memory from the filesystem and regenerate the promises if necessary.

Options:

-i: run the agent in information mode, displays all executed commands

-c: run the agent without color output

trigger-policy-generation

trigger a policy generation. This command will trigger a policy generation, to generate policies for any nodes that may have changed

Options:

-i: run the agent in information mode, displays all executed commands

-c: run the agent without color output

upgrade-techniques

Upgrade techniques in the configuration repository from the packaged ones. This command will replace the techniques in /var/rudder/configuration-repository/techniques by the techniques found in /opt/rudder/share/techniques which is installed by rudder-technique package. The upgrade can take care of user defined changes. This command creates an update branch "rudder_update" with the content of current techniques first time is it run

Options:

-u: merge updated techniques into the configuration repository

-i: create the initial version of the update branch

-o: override existing technique without looking for local changes

-f: suppress any warning and run without prompting for input

-c: use the given commit id as the update branch origin

-a --autoupdate-technique-library: automatically update technique library if autoupdate-technique-library is true by doing an override of existing Techniques

--set-autoupdate-technique-library=true/false: set the auto update technique library option at upgrade to true or false (for Rudder 5+)

-s --show: Display the currently defined options

AUTHOR

Normation SAS (contact@normation.com)

RESOURCES

Sources of the rudder command-line: https://github.com/Normation/rudder-agent/

COPYING

Copyright (C) 2014-2020 Normation SAS.

rudder-relayd(1)

NAME

rudder-relayd - Rudder relay daemon that makes the link between nodes and root server.

SYNOPSIS

rudder-relayd [--check] [--config directory]

rudder-relayd --help

DESCRIPTION

A tool to process reports and inventories from Rudder agents and forward them to the upstream relay or send them to the root server.

OPTIONS

-c, --config directory

Configuration directory to load (default is /opt/rudder/etc/relayd/).

-t, --test

Test configuration files syntax and exit.

-h, --help

Print help information.

-V, --version

Print version information.

EXIT CODES

0

Normal shutdown

1

Unexpected crash

2

Invalid configuration files

3

Other errors

AUTHOR

Rudder developers <dev@rudder.io>

RESOURCES

Main web site: https://www.rudder.io/ Documentation: https://docs.rudder.io/

COPYING

Copyright (C) 2019 Normation SAS.


← Build packages from source Variables →