LoginSignup
5

More than 3 years have passed since last update.

Splunkに対してForwarderからのデータが届かない時のトラブルシューティングTIPS

Last updated at Posted at 2019-10-11

はじめに

  • ForwarderからSplunkへデータを飛ばす際に、ハマることはままあります。
  • そんなときに私がよく確認する項目をまとめましたのでご参考ください
  • ForwarderとSplunk間のNW疎通要件はこちらを参考に。

Check0: 経路間の疎通確認

  • 通信経路途中の9997番ポート宛の通信はblockされていないか?
  • UFがインストールされたOSのFirewallポリシーで9997番ポート宛の通信はblockされていないか?

YES⇢ OK、通行許可を与えてあげてください。
NO⇢ 次にいきましょう。

Check1: Forwarderのsplunkdプロセスを再起動して、改善されるか確認

  • Deployment ServerからAppが配布された後、あるいは手動でUF内のconfを編集した後、splunkdのサービス再起動が必要です。
  • 念の為、splunkdサービス再起動しておきましょう。
/opt/splunkforwarder/bin/splunk restart

Check2:SplunkサーバにForwarderから何かしらデータが届いていないか確認

  • Splunk管理コンソールにてデータの取得状況をチェックする方法です。

1. 監視対象データ(ログ)が届いているか?

取込対象のデータがindexのどこかに取り込まれていないか?

index=* host=(サーバ名)

確認ポイント:意図したindexではないがデータは届いてるか?
Yes ⇢ UF側のinputs.confの設定を見直し、意図したindexに保存するよう設定し直しましょう。

(例)dhcpログをwin_dhcpに取り込みたい場合
[monitor://C:\Windows\System32\dhcp]
sourcetype = DhcpSrvLog
index = win_dhcp

No ⇢ 次に紹介するinternal logをチェックしましょう。

2. UF自身が吐き出すinternal logが届いているか?

そもそもUFがちゃんとSplunkと疎通できていれば内部ログが届いています。

index=_internal host=(サーバ名) 

YES ⇢ このようにmetricsデータとかsplunkdログなどが届きます。
スクリーンショット 2019-10-11 14.45.41.png

NO ⇢ 何も届いていない。次のチェックにいきます。

Check3:UF内のsplunkdログをチェックして、ERRORまたはWARNメッセージが発生していないか確認

手っ取り早く調査に必要なデータを集める場合は、少なくとも以下の結果を集めると効率が良いです。

①diagファイル

splunkdログを初めてとして、UF内のappもすべて内包されているので重要な情報源です。
取得手順はこちらです。集めたdiagを解凍して、splunkdファイルをtailやテキストエディタでチェックします。

確認ポイント
ERROR or WARNの内容をチェック
以下によく見かけるメッセージを列挙しました。

TcpOutputProc - Cooked connection to Forwarder IP:9997 timed out

ThruputProcessor - Current data throughput (256 kb/s) has reached maxKBps. As a result, data forwarding may be throttled. Consider increasing the value of maxKBps in limits.conf.

②confの設定内容を確認するコマンドの結果

conf設定の不足がないか最低限以下の3つで確認しますが、まずは少なくともoutputs.confだけでも集めます。

/opt/splunkforwarder/splunk btool outputs list --debug > outputs_debug.txt
/opt/splunkforwarder/splunk btool inputs list --debug > inputs_debug.txt
/opt/splunkforwarder/splunk btool props list --debug > props_debug.txt

確認ポイント
・UFのデータ送付先が意図したsplunkサーバが設定されているか
・競合する設定がないか?
・typoしていないか?

outputs.conf
(中略)
/opt/SplunkForwarder/etc/system/local/outputs.conf   [tcpout:default-autolb-group]
/opt/SplunkForwarder/etc/system/local/outputs.conf   server = 13.57.xxx.xxx:9997

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5