Advanced use of the cyberwatch command

This documentation explains how to use the advanced parameters of the cyberwatch command using environment variables.

All the following variables can be modified in two different ways:

  • Temporarily. By using the variable in the command line. For example, to make a backup in another folder:

     sudo CBW_BACKUP_DIR=/tmp/backups cyberwatch backup save
    
  • “Definitively” by adding or editing the configuration file of the Cyberwatch orchestrator located at /etc/cyberwatch/config.env (or defined by ${CBW_CONFIG_FILE})

Variables

CBW_CONFIG_FILE

Default: /etc/cyberwatch/config.env

Used to change the file containing all the parameters of the Cyberwatch orchestrator.

CBW_CONFIG_DIR

Default: /etc/cyberwatch

Used to change the directory containing all configuration files of the Cyberwatch orchestrator.

Editing this parameter can change the CBW_CERT_DIR and CBW_SSL_DIR variables.

CBW_CERT_DIR

Default: ${CBW_CONFIG_DIR}/certs

Used to change the storage directory of the certificates.

CBW_SSL_DIR

Default: ${CBW_CONFIG_DIR}/ssl

Used to change the directory containing the certificate presented by the web interface (nginx.crt and nginx.key). For more information, visit Change the TLS certificate of Cyberwatch.

CBW_NGINX_UID

Default: 101 (0 with orchestrator version 5.31)

Used to change the UID assigned to the ${CBW_SSL_DIR} directory at each startup. It must match the user of the nginx container. Only change it when isolating containers by namespace.

CBW_NGINX_GID

Default: 101 (0 with orchestrator version 5.31)

Used to change the GID assigned to the ${CBW_SSL_DIR} directory at each startup, under the same conditions as CBW_NGINX_UID.

CERT_WARNING_DAYS

Default: 90

Number of days before the expiration of a certificate from which a warning is displayed when Cyberwatch starts.

CERT_RENEWAL_DAYS

Default: 45

Number of days before expiration from which a certificate is renewed: automatically when Cyberwatch starts for the certificates of the services, or with the cyberwatch renew-certificates command. For more information, visit the procedure for renewing TLS certificates.

CERT_VALIDITY_DAYS

Default: 365

Validity period, in days, of the service certificates generated or renewed by Cyberwatch.

ROOT_CERT_VALIDITY_DAYS

Default: 3650

Validity period, in days, of the root certificates generated by Cyberwatch.

CBW_BACKUP_DIR

Default: /var/lib/cyberwatch/backups

Used to change the storage directory of backups. For more information on backups, visit Procedure to backup and restore Cyberwatch.

CBW_SKIP_BACKUP

Default: false

Used to disable backup of the database. These backups are performed each time the Cyberwatch orchestrator is restarted. For more information on backups, visit Procedure to backup and restore Cyberwatch.

CBW_REPORT_DIR

Default: /var/lib/cyberwatch/reports

Used to change the storage directory of reports generated with the cyberwatch report command.

CBW_OFFLINE

Default: false

Used to enable/disable offline mode of the Cyberwatch orchestrator. For more information about offline administration, visit Offline administration guides.

CBW_DISABLE_ELK

Default: false

Used to disable the deployment of the embedded Elasticsearch and Kibana on master/single nodes. When set to true, the ELK stack is excluded from the Cyberwatch deployment. The change is applied on the next cyberwatch configure or, on Docker Swarm only, on the next startup. For more information, visit Configure an external Elastic Stack.

CBW_NO_PULL

Default: false

Used to disable the download of images from the container registry. The cyberwatch start and cyberwatch restart commands then use the images already present on the node. This behavior can be changed for a single run, without editing the configuration file, with the --no-pull and --force-pull options available starting with orchestrator version 5.32. For example, to update an instance configured with CBW_NO_PULL="true":

sudo cyberwatch restart --force-pull