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

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

Views:
7,572
Visibility:
Public
Votes:
2
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

::> 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ホストへの送信内容はsettingsによって制御されます
  • 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タイプの宛先への接続のみをチェックできます
  • 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.