メインコンテンツへスキップ

syslogサーバーへのイベント転送

Views:
17,481
Visibility:
Public
Votes:
4
Category:
ontap-9
Specialty:
core
Last Updated:

​ ​ ​  

環境

  • ONTAP 9
  • clustered Data ONTAP 8
  • Data ONTAP 7-Mode

回答

概要
  • syslogは重大度の範囲があるイベントトリガー型メッセージです
  • EMSイベントはsyslog標準に従います
  • この標準はIETFによってRFC 5424で定義されています

Syslog転送の設定方法

一般に、syslog 転送の設定は次の3つの手順で構成されます
  1. ONTAPでsyslogデスティネーションサーバを作成する
  2. 転送先サーバとして選択したサーバに転送したいEMSイベントのリストを識別するイベントフィルタを作成します
  3. 選択したイベントフィルタをsyslogサーバに転送するイベント通知を作成します。
ONTAPのsyslogに関するその他のガイド

7-ModeとClustered Data ONTAPの違い

ONTAP 9
  • ONTAP 9.XにおけるEMS構成およびイベント通知システムへの変更
  • ONTAP 9.XではEMSの運用が再設計されました
  • 通知は、'event notification' コマンドを使用して設定されるようになりました
  • ‘event route’および‘event destination’コマンドファミリは、9.Xで非推奨になりました
  • 8.3.xからのアップグレード
    • ONTAP 9.Xにアップグレードした後、ONTAP docsページUpdate EMS event mapping from deprecated ONTAP commandsを使用して、現在のイベント通知に変更を加えます
    • 古い8.3.xの設定をすべて削除し、ONTAP 9.XでEMSイベントマッピングを一からやり直すには、次の手順を実行します:

::> event route remove-destinations -message-name !callhome.* -destinations *

::> event route modify -message-name callhome.* -destinations asup

Clustered Data ONTAP(8.X)
  •  clustered Data ONTAPでは、/etc/syslog.confファイルは非推奨になりました
  • したがって、リモートsyslogホストに送信される内容は設定によって制御されます
  • Syslogは、event routeコマンドとevent destinationコマンドを使用して設定できます
7-Mode
  • Data ONTAP 7-Mode では、syslogd デーモンは、設定ファイル /etc/syslog.conf で指定されたとおりに、システムメッセージをコンソール、ログファイル、およびその他のリモートシステムに記録します。
  • syslogd デーモンは、起動手順中に起動するとき、または /etc/syslog.conf ファイルが変更されてから 30 秒以内に、設定ファイルを読み込みます。
  • 設定ファイルの形式については、na_syslog.conf(5)を参照してください。
    • 7-Modeの構成ファイルの例
# 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
 

Syslog Translatorとは何ですか?

トラブルシューティング

  • syslog関連の問題をトラブルシューティングする場合、最も一般的な問題は次の点を指します。
    • 設定の問題
      •  詳しい情報については、上記リンク先のセットアップガイドおよび関連記事をご覧ください。
    • syslogサーバへの接続
      • 接続テストの場合
        • syslogサーバでメッセージを受信できない場合は、Wiresharkなどの無料のパケットキャプチャプログラムを使用できます。
        • このプログラムには、ネットワークインターフェイスカード(NIC)に送信されたパケットをキャプチャする機能があります。このトラフィックをフィルタリングして分析することで、ネットワークデバイスが実際に期待される情報をシステムに送信しているかどうかを判断できます。
syslogサーバから接続(ネットワーク)問題をテストするには:
  1. プログラムWiresharkをダウンロードしてインストールします
  2. [Capture]メニューを使用して[Capture Options]フォームを開きます
  3. ONTAPノードに接続するNICを選択し、UDPポート514(デフォルトのsyslogポート)に送信されるすべてのパケットを検索するキャプチャフィルタを定義します
  4. [Start]ボタンを押すと、送信されているパケットが表示されます
  5. キャプチャを停止してデータを表示します。プロトコルがSyslogであるパケットが表示されます
  6. メッセージが受信できない場合は、pingコマンドとtracerouteコマンドを使用してsyslogサーバへの接続を確認してください
ONTAP 9
  • ONTAP 9では 以下のコマンドを実行して、EMSメッセージが作成されたかどうかを確認し、syslogサーバへの接続性を確認できます。

::> set diag

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

::*> event notification history show

  • イベント通知 destination check コマンドはテストメッセージを送信して接続先への接続をチェックします
    • 送信先は、event notification destination コマンドを使用してすでに設定されている必要があります
    • このコマンドは、メッセージが宛先に正常に送信されたかどうかを示す結果を表示します
    • 失敗した場合は、notifyd.log ファイルでより詳細な情報を確認できます
      • 注記:現在、このコマンドで接続を確認できるのは、rest-apiタイプの宛先 およびTCPベースのsyslog宛先のみです。
  • event notification history show コマンドは、通知先に送信されたイベントメッセージの一覧を表示します
    • 各イベントに対してコマンドで表示される情報は、event log show commandの情報と同じです
    • このコマンドでは通知の送信先に送信されたイベントが表示されますが、event log show commandではログに記録されたすべてのイベントが表示されます
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.