Skip to main content
Cluster and storage switches
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

配置日志收集

贡献者

以太网交换机运行状况监控器(CSHM)负责确保集群和存储网络交换机的运行状况、并收集交换机日志以进行调试。此过程将指导您完成设置收集、请求详细的*Support*日志以及启用每小时收集AutoSupport收集的*定期*数据的过程。

*注:*如果启用FIPS模式,则必须完成以下操作:

备注
  1. 按照供应商说明在交换机上重新生成SSH密钥。

  2. 使用在ONTAP中重新生成SSH密钥 debug system regenerate-systemshell-key-pair

  3. 使用 `system switch ethernet log setup-password`命令重新运行日志收集设置例程

开始之前

  • 用户必须能够访问交换机 show 命令。如果这些权限不可用、请创建一个新用户并向该用户授予必要的权限。

  • 必须为交换机启用交换机运行状况监控。通过确保进行验证 Is Monitored: 字段在的输出中设置为*TRUE* system switch ethernet show 命令:

  • 要使用Broadcom和Cisco交换机收集日志、请执行以下操作:

    • 用户必须具有网络管理员Privileges。

    • 应在交换机上为启用了日志收集的每个集群设置创建一个新用户。这些交换机不支持同一用户使用多个SSH密钥。执行的任何其他日志收集设置都会覆盖用户的任何已有SSH密钥。

  • 要使用NVIDIA交换机收集支持日志、必须允许用于收集日志的_user_运行 `cl-support`命令、而无需提供密码。要允许使用此命令、请运行以下命令:

    echo '<user> ALL = NOPASSWD: /usr/cumulus/bin/cl-support' | sudo EDITOR='tee -a' visudo -f /etc/sudoers.d/cumulus

步骤

  1. 要设置日志收集、请对每个交换机运行以下命令。系统会提示您输入交换机名称、用户名和密码以收集日志。

    *注:*如果回答 `y`用户规范提示,请确保用户具有中所述的必要权限开始之前

    system switch ethernet log setup-password
    Cli
    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>
  2. 要请求支持日志收集并启用定期收集、请运行以下命令。此时将开始两种类型的日志收集:详细 Support 日志和每小时数据收集 Periodic

    system switch ethernet log modify -device <switch-name> -log-request true
    Cli
    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.

    等待10分钟、然后检查日志收集是否完成:

    system switch ethernet log show
    Cli
注意 如果日志收集功能报告了任何错误状态(在的输出中可见 system switch ethernet log show),请参见以了解更多详细信息。 "对日志收集进行故障排除"
下一步是什么?

"配置SNMPv3 (可选)"(英文)