Man pages

Table of Contents

rudder(8)

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

    Options:

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

    -c: run the agent without color output

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

-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.

-m: run the agent with multiline output

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

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.
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

-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.

-m: run the agent with multiline output

-f: run the agent even if it is disabled

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)

-w: show full strings, never cut output

-c: run the agent without color output

-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.

-m: run the agent with multiline output

-b: run the agent on a specific bundle

-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

-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.

-m: run the agent with multiline output

-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

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.
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

AUTHOR

Normation SAS (contact@normation.com)

RESOURCES

Main web site: https://rudder-project.org/

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

COPYING

Copyright (C) 2014-2015 Normation SAS.