Configure log collection
The Ethernet switch health monitor (CSHM) is responsible for ensuring the operational health of Cluster and Storage network switches and collecting switch logs for debugging purposes. This procedure guides you through the process of setting up collection, requesting detailed Support logs, and enabling an hourly collection of Periodic data that is collected by AutoSupport.
NOTE: If you enable FIPS mode, you must complete the following:
|
Before you begin
-
The user must have access to the switch
show
commands. If these are not available, create a new user and grant the necessary permissions to the user. -
Switch health monitoring must be enabled for the switch. Verify this by ensuring the
Is Monitored:
field is set to true in the output of thesystem switch ethernet show
command. -
For support log collection with NVIDIA switches, the user for log collection must be permitted to run the
cl-support
command without having to provide a password. To allow this usage, run the command:echo '<user> ALL = NOPASSWD: /usr/cumulus/bin/cl-support' | sudo EDITOR='tee -a' visudo -f /etc/sudoers.d/cumulus
Steps
-
To set up log collection, run the following command for each switch. You are prompted to enter the switch name, username, and password for log collection.
system switch ethernet log setup-password
cluster1::*> system switch ethernet log setup-password Enter the switch name: <return> The switch name entered is not recognized. Choose from the following list: cs1 cs2 cluster1::*> system switch ethernet log setup-password Enter the switch name: cs1 Would you like to specify a user other than admin for log collection? {y|n}: n Enter the password: <enter switch password> Enter the password again: <enter switch password> cluster1::*> system switch ethernet log setup-password Enter the switch name: cs2 Would you like to specify a user other than admin for log collection? {y|n}: n Enter the password: <enter switch password> Enter the password again: <enter switch password>
-
To request support log collection and enable periodic collection, run the following command. This starts both types of log collection: the detailed
Support
logs and an hourly collection ofPeriodic
data.system switch ethernet log modify -device <switch-name> -log-request true
cluster1::*> system switch ethernet log modify -device cs1 -log-request true Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y Enabling cluster switch log collection. cluster1::*> system switch ethernet log modify -device cs2 -log-request true Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y Enabling cluster switch log collection.
Wait for 10 minutes and then check that the log collection completes:
system switch ethernet log show
-
To set up log collection, run the following command for each switch. You are prompted to enter the switch name, username, and password for log collection.
system switch ethernet log setup-password
cluster1::*> system switch ethernet log setup-password Enter the switch name: <return> The switch name entered is not recognized. Choose from the following list: cs1 cs2 cluster1::*> system switch ethernet log setup-password Enter the switch name: cs1 Would you like to specify a user other than admin for log collection? {y|n}: n Enter the password: <enter switch password> Enter the password again: <enter switch password> cluster1::*> system switch ethernet log setup-password Enter the switch name: cs2 Would you like to specify a user other than admin for log collection? {y|n}: n Enter the password: <enter switch password> Enter the password again: <enter switch password>
-
Enable periodic log collection:
system switch ethernet log modify -device <switch-name> -periodic-enabled true
cluster1::*> system switch ethernet log modify -device cs1 -periodic-enabled true Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y cs1: Periodic log collection has been scheduled to run every hour. cluster1::*> system switch ethernet log modify -device cs2 -periodic-enabled true Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y cs2: Periodic log collection has been scheduled to run every hour. cluster1::*> system switch ethernet log show Periodic Periodic Support Switch Log Enabled Log State Log State cs1 true scheduled never-run cs2 true scheduled never-run 2 entries were displayed.
-
Request support log collection:
system switch ethernet log collect-support-log -device <switch-name>
cluster1::*> system switch ethernet log collect-support-log -device cs1 cs1: Waiting for the next Ethernet switch polling cycle to begin support collection. cluster1::*> system switch ethernet log collect-support-log -device cs2 cs2: Waiting for the next Ethernet switch polling cycle to begin support collection. cluster1::*> *system switch ethernet log show Periodic Periodic Support Switch Log Enabled Log State Log State cs1 false halted initiated cs2 true scheduled initiated 2 entries were displayed.
-
To view all details of log collection, including the enablement, status message, previous timestamp and filename of periodic collection, the request status, status message, and previous timestamp and filename of support collection, use the following:
system switch ethernet log show -instance
cluster1::*> system switch ethernet log show -instance Switch Name: cs1 Periodic Log Enabled: true Periodic Log Status: Periodic log collection has been scheduled to run every hour. Last Periodic Log Timestamp: 3/11/2024 11:02:59 Periodic Log Filename: cluster1:/mroot/etc/log/shm-cluster-info.tgz Support Log Requested: false Support Log Status: Successfully gathered support logs - see filename for their location. Last Support Log Timestamp: 3/11/2024 11:14:20 Support Log Filename: cluster1:/mroot/etc/log/shm-cluster-log.tgz Switch Name: cs2 Periodic Log Enabled: false Periodic Log Status: Periodic collection has been halted. Last Periodic Log Timestamp: 3/11/2024 11:05:18 Periodic Log Filename: cluster1:/mroot/etc/log/shm-cluster-info.tgz Support Log Requested: false Support Log Status: Successfully gathered support logs - see filename for their location. Last Support Log Timestamp: 3/11/2024 11:18:54 Support Log Filename: cluster1:/mroot/etc/log/shm-cluster-log.tgz 2 entries were displayed.
If any error statuses are reported by the log collection feature (visible in the output of system switch ethernet log show ), see Troubleshoot log collection for further details.
|