axorouter-ctl

Commands and options of axorouter-ctl, the tool you run on an AxoRouter host to control and troubleshoot it.

Name

axorouter-ctl — Utility to control and troubleshoot AxoRouter

Synopsis

axorouter-ctl [command] [options]

Description

The axorouter-ctl application is a utility that is needed mainly for troubleshooting. For example, it can be used to:

Control syslog container

Usage: axorouter-ctl control syslog <command> <options>

This command allows you to access and control the syslog container of AxoRouter. Essentially, it’s a wrapper for the syslog-ng-ctl command of AxoSyslog. Usually, you don’t have to use this command unless our support team instructs you to.

For example:

  • Enable debug messages for troubleshooting: axorouter-ctl control syslog log-level verbose
  • Display the current configuration: axorouter-ctl control syslog config --preprocessed
  • Reload the configuration: axorouter-ctl control syslog reload

For details, see the AxoSyslog documentation .

Show help

Usage: axorouter-ctl help

Lists the available commands. Running axorouter-ctl without a command shows the same list.

Show logs

Usage: axorouter-ctl logs <target> <journalctl-options>

Displays the logs of the target container: cloudconnector, logstore, resolver, rsigma, store, syslog, or wec. Cloud connector logs are available only if the AxoRouter host has a Axoflow Cloud Connector configured. WEC logs are available only if the AxoRouter host has a Windows Event Collector (WEC) connector configured.

The axorouter-ctl logs command is a wrapper for the journalctl command, so you can add regular journalctl options to the command. For example, -n 50 to show the 50 most recent lines: axorouter-ctl logs syslog -n 50

Prune images

Usage: axorouter-ctl prune

Removes all unused images from the local store, similarly to podman-image-prune.

Pull images

Usage: axorouter-ctl pull

Download images needed for AxoRouter. This is usually not needed unless you have a custom environment, for example, proxy settings or pull credentials that aren’t available when the AxoRouter container is run.

Manage the axorouter-resolver service

Usage: axorouter-ctl resolver <command>

Manages the axorouter-resolver service. Use the clear-cache command to delete the cache of the service.

Shell access to AxoRouter

Usage: axorouter-ctl shell <target>

Open a shell into the target container (logstore, resolver, rsigma, store, syslog, or wec). Usually needed only for troubleshooting purposes, when requested by our support team.

Statistics and metrics

Usage: axorouter-ctl stats syslog [legacy|prometheus]

Display the statistics and metrics of the syslog container in Prometheus or legacy format, from the underlying AxoSyslog process. If you don’t specify the format, the command uses the legacy format. For details, see the AxoSyslog documentation .

Access AxoStore database

Usage: axorouter-ctl store

CAUTION:

Access the database directly only when instructed by the support team, or if you know exactly what you’re doing.

Start an interactive SQL session using the command-line ClickHouse client to access data stored in AxoStore. Type exit to end the session.

Version

Usage: axorouter-ctl version

Show the version number of AxoRouter and of the underlying AxoSyslog build, for example:

Terminal window
0.58.0
axosyslog 4 (4.11.0)
Config version: 4.2
Installer-Version: 4.11.0

Wipe disk buffer files

Usage: axorouter-ctl wipe [-n|--dry-run] [-a|--all] [--backup-dir <directory>]

Cleans up the corrupted and abandoned disk buffer files. Usually, you don’t have to use this command unless our support team instructs you to, or an alert suggests it.

How the command handles a file depends on the state of the file:

  • Corrupted files are moved to the backup directory. The command never deletes them.
  • Abandoned files that contain no messages are deleted.
  • Abandoned files that contain messages are truncated, then moved to the backup directory. To delete these files without keeping a backup, use the -a or --all option.

To see what the command would move, truncate, and delete without changing anything, use the -n or --dry-run option.

A backup keeps the original path of the file, with a .backup suffix. For example, /var/lib/syslog-ng/syslog-ng-00000.rqf is backed up as <backup-directory>/var/lib/syslog-ng/syslog-ng-00000.rqf.backup.

The default backup directory is /var/lib/syslog-ng/diskqueue_backup in the syslog container. On the host, this is the diskqueue_backup directory in the persist directory of AxoRouter. To use a different backup directory, use the --backup-dir <directory> option. The directory is a path in the syslog container: only directories under /var/lib/syslog-ng are kept when the container restarts.

The command prints a warning, and still runs, if:

  • the backup directory isn’t under /var/lib/syslog-ng, because the backups are lost when the container is recreated, or
  • the persistent storage directory on the host isn’t /var/lib/syslog-ng. In this case, the warning shows the directory on the host where the backups are.

If the command processed abandoned disk buffer files, it reloads AxoSyslog when the cleanup is complete.

Environment variables

  • AVOID_SUDO: Set to 1 to prevent axorouter-ctl from running itself with sudo. By default, the command runs itself again as root if you start it as an unprivileged user.
  • AXOROUTER_X: Set to any non-empty value to print every command that axorouter-ctl runs. Use it to troubleshoot axorouter-ctl itself.