The lc-admin
command allows you to remotely (or locally) interact with a
running Log Courier instance to monitor and control log shipping, using the REST
API.
To enable the Log Courier REST API, set the admin
enabled
configuration entry to true
. To specify
a custom listen address, set the admin
listen address
option.
NOTE: lc-admin
version 2.0.0 and above cannot connect to older 1.x Log
Courier instances.
Displays a list of available commands.
Displays a full status snapshot of all Log Courier internals.
The prospector
command will show the current status of all watched files and
their corresponding shipping status if they are actively being shipped.
Information can be narrowed down by specifying status
or files
as a
parameter. Information for a specific files
entry can be requested by
following it by the internal file ID. This file ID changes on each restart of
Log Courier.
Show the connectivity status with the publisher
command. This will show the
status of each connected endpoint and a summary of the overall shipping status.
Narrow the information by specifying status
or endpoints
as a parameter.
Information for a specific endpoint can be requested by following it by its
name in the configuration file, or by its internal ID number.
Requests Log Courier to reload its configuration.
Displays the version of the connected Log Courier instance.
Displays a live go routine trace of the running Log Courier instance for debugging purposes.
The lc-admin
command accepts the following command line options.
RPM/DEB Package Default: /etc/log-courier/log-courier.yaml
Load the given configuration file and connect to the admin
listen address
specified inside it. Ignored if -connect
is specified.
Default: tcp:127.0.0.1:1234
Connect to the REST API using the specified address. Any -config
option is
ignored if -connect
is used.
The address is in the format transport:address
or just address
, in which case
"tcp" is the assumed transport.
Allowed transports are "tcp", "tcp4", "tcp6" (Windows and *nix) and "unix"
(*nix only). For the tcp transports the address format is host:port
. For the
unix transport the address should specify a filename to use when connecting. If
no transport name is specified, "tcp" is assumed.
Examples:
127.0.0.1:1234
tcp:127.0.0.1:1234
unix:/var/run/log-courier/admin.socket
Default: false
Quietly execute the command line argument and output only the result.
Default: false
Display the Log Courier client version.
Default: false
Repeat the command specified on the command line every second