Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Parameter | Description |
---|---|
| IP address of the Swarm API endpoint (or set |
| Admin credentials in the format |
| New log level to set (values: |
| New node log level to set (values: |
| Duration in seconds to keep the new log level (optional). |
| Runs the script in a detachable session using |
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
Ensure the
at
service is installed, enabled and runningCode Block dnf -y install epel-release dnf -y install at systemctl enable --now at
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.
...