跳转到主内容

事件转发到 syslog 服务器

Views:
276
Visibility:
Public
Votes:
1
Category:
ontap-9
Specialty:
core
Last Updated:

可不使用  

适用场景

  • ONTAP 9
  • 集群模式Data ONTAP 8.
  • Data ONTAP 7-模式

问题解答

  • 本文列出了常见的系统日志操作和故障排除工作流。
    • 但是,这不是一个全面的清单。
  • 这可用于将搜索范围缩小到更常用的故障排除知识库、并按特定类别进行细分。

概述

  • EMS事件符合系统日志标准、因为它们可以转发到系统日志服务器进行实时监控。
  • 日志是由集群模式Data ONTAP操作系统生成并记录在集群上的平面文本文件中的事件触发的消息、其严重性不等。
  • 日志是管理员、NetApp支持和AutoSupport™ 系统确定和隔离各种问题根源的主要资源。
  • 可以使用多种不同的方法收集、查看和转发日志。
    • 本文将讨论系统日志。
  •  系统日志是为计算机消息日志记录定义的标准。
  • 该标准由IETF在RFC 5424中定义。系统日志定义了软件如何格式化和发送消息、以便管理员可以正确监控软件的行为、并使用可接收和分析已发送消息的工具。
  • 由于此标准已得到普遍认可、因此管理员可以实时监控支持系统日志转发的所有资产。
  • 系统日志消息标有一个设施代码、指示生成该消息的流程或应用程序、并 分配了严重性。

如何配置系统日志转发

7-模式与集群模式Data ONTAP之间的差异
 
7-模式
  • 在Data ONTAP 7-模式中、syslogd守护进程会将系统消息记录到控制台、日志文件以及由其配置文件(syslog.conf)指定的其他远程系统。
  • syslogd守护进程会在启动操作步骤期间启动时或修改/etc/syslog.conf文件后的30秒内读取其配置文件。
  • 有关配置文件格式的信息,请参见 na_slog.conf(5)
  • 7-模式中的配置文件示例
  # Log all kernel messages, and anything of level err or
  # higher to the console.
  *.err;kern.*                 /dev/console
 
  # Log anything of level info or higher to /etc/messages.
  *.info                        /etc/messages
 
  # Also log the messages that go to the console to a remote
  # loghost system called adminhost.
  *.err;kern.*                  @adminhost
 
  # Also log the messages that go to the console to the local7
  # facility of another remote loghost system called adminhost2
  # at level info.
  *.err;kern.*                  local7.info@adminhost2
 
  # The /etc/secure.message file has restricted access.
  auth.notice                   /etc/secure.message
 

 
集群模式 Data ONTAP
  •  在集群模式Data ONTAP中、已弃用/etc/syslog.conf文件。
  • 因此、访问远程系统日志主机的内容由设置控制。
  • 系统日志可以使用event route和event Destination命令进行设置。
ONTAP 9
在ONTAP 9.x中对EMS配置和事件通知系统进行了更改
  • EMS操作已针对ONTAP 9.0进行了重新设计。
  • 9.0中已弃用‘event route’和‘event Destination’命令系列。
  • 现在、可以使用 event notㄖ 命令设置通知 
从8.3.x升级

升级到ONTAP 9.0后、请使用EMS配置快速指南重新配置EMS通知。

  • 要删除当前配置、请执行以下操作:
::>event route remove-destinations -message-name !callhome.* -destinations *
::>event route modify -message-name callhome.* -destinations asup
 
什么是系统日志转换器?

故障排除

  • 在对系统日志相关问题进行故障排除时、最常见的问题是:
    • 配置问题
    • 连接到系统日志服务器
    • 对于配置问题:
      •  查看设置指南和相关文章以获得更多帮助
    • 对于连接测试:
      • 如果在Syslog服务器上无法接收消息,则可以使用免费的数据包捕获程序,例如,在进行数据包捕获时使用。
      • 此程序提供了在数据包发送到网络接口卡(NIC)时捕获数据包的功能。通过筛选和分析此流量、您将能够确定网络设备是否实际向系统发送了预期的信息
设置步骤:
  1. [1] 下面的地址下载并安装该程序:
  2. 使用“捕获”菜单打开“捕获选项”表单。
  3. 选择NIC并定义一个捕获筛选器、该筛选器将查找发送到UDP端口514 (默认系统日志端口)的所有数据包。
  4. 按“Start (开始)”按钮,您将看到正在发送的数据包。
  5. 停止捕获并查看数据。它应显示协议为系统日志的数据包。
  6. 如果未收到任何消息、请使用ping和traceroute命令检查与系统日志服务器的连接。
 ONTAP 9
  • 在ONTAP 9中 、您可以运行以下命令来验证是否已创建EMS消息、并验证与系统日志服务器的连接。

::> set diag
::*> event notification destination check -node {nodename>|local} -destination-name <dest>   

::>event notification history show

  • event Notification Destination check命令通过向目标发送测试消息来检查与目标的连接。
    • 必须已使用event Notification Destination命令配置目标。
    • 命令将显示一个结果、指示消息是否已成功发送到目标。
    • 如果出现故障、可以在notifyd.log文件中找到更详细的信息。
    • 注意:目前、此命令只能检查与REST-API类型的目标的连接。
  • event Notification hist历史 记录show 命令可显示已发送到通知目标的事件消息列表。
    • 命令为每个事件显示的信息与event log show命令显示的信息相同。
    • 此命令显示发送到通知目标的事件、而event log show命令显示已记录的所有事件。

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.