Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter

Description

-d, --swarm_ip

IP address of the Swarm API endpoint (or set SCSP_HOST environment variable).

-p, --credentials

Admin credentials in the format admin:password. Secure password entry is prompted if not provided.

-i, --log.level

New log level to set (values: 5, 10, 15, 20, 30, 40, 50, chatter, debug, announce, info, error, critical, default).

-L --node.log.level

New node log level to set (values: 0, 5, 10, 15, 20, 30, 40, 50, chatter, debug, announce, info, error, critical, default).

-t, --time

Duration in seconds to keep the new log level (optional).

-D, --detach

Runs the script in a detachable session using screen or tmux, allowing continued operation if terminal session ends (optional).

Instruction for Use

Example 1: Set cluster log level to 30 (permanent change

...

)

Code Block
./castor-change-log-level.sh -d 192.168.8.84 -p admin:datacore -i 30

...

Example 5: Schedule the script to run at 3:00 AM on 03/02/2025 and collect debug logs of node 192.168.8.84 and 192.168.8.89 for 1 hour

  1. Ensure the at service is installed, enabled and running

    Code Block
    dnf -y install epel-release
    dnf -y install at
    systemctl enable --now at
  2. Schedule the script execution using at:

    Code Block
    echo "/root/dist/castor-change-log-level.sh -p admin:datacore -d 192.168.8.84 -L '192.168.8.84,192.168.8.89' 10 -t 3600" | at 03:00 AM 03/02/2025

This schedules the script to run at 3:00 AM on Feb 16 Mar 02, 2025 and collects log at debug level for 1 hour.

...