Getting Data In

通信がうまくいかない

Masahito
Engager

VMware player上で仮想マシンを2台立ち上げて、Splunkを動かそうとしています。

windows7をSplunkをインストールしreceiver、UbuntuにUniversal Forwarderをインストールして、解説を参考に両方とも設定を行いましたがSplunk側がforwarderを見つけてくれません。

windows側にはSplunk for Unix and linuxとSplunk Tecknology Add-on for unix and Linux Ubuntu側にはSplunk Tecknology Add-on for unix and Linux のAPPをインストールしています。

ファイヤーウォールは無効化しています。

何か助言等お願いします。

0 Karma
1 Solution

melonman
Motivator

Windows7をIndexer(IDX), CentOSをUniversal Forwarder(UF)として、設定する際のざっくりとしてた手順は以下の流れです。

  1. Win7にSplunkをインストールし、Unix Appもインストール、Splunkの再起動
  2. Win7上で受信ポートをOpen(9997)
  3. CentOSにUFをイントールし, outputs.conf(etc/system/local以下など)を作成編集して、データ転送の設定をして、再起動して有効化

    [tcpout:group1]
    server=172.16.220.128:9997

  4. TA for UnixをCentosにインストール(tar -xvf でetc/apps以下に展開)し、Splunk_TA_nix/local以下で、apps.conf(taの有効化)と、inputs.conf(データ取り込み設定の有効化)を設定し、ufを再起動

    # pwd
    /opt/splunkforwarder/etc/apps/Splunk_TA_nix/local

    # cat app.conf
    [install]
    is_configured = true

    # cat inputs.conf | head -10
    [script://./bin/vmstat.sh]
    disabled = 0

    [script://./bin/iostat.sh]
    disabled = 0

    [script://./bin/ps.sh]
    disabled = 0
    ...つづく

以上で、設定は完了なのですが、確認するポイントは、手順3でしょうか。
CentOSからWindowsにデータを転送する設定がされているか確認してみてください。

Win7上のSplunkから、以下をサーチしてみて、Win7以外からのHostが見えているか確認してみるのも簡単な確認方法です。

index=_internal | stats count by host

    host            count
--- --------------- -----   
1   WIN-DEEFAFD6BQ8 15305
2   centos          708

確認してうまくいかないようでしたら、追加commentしてみてくださいませ。

View solution in original post

0 Karma

Masahito
Engager

compressをはずしたところ、Ubuntuを認識しました。

あとでCompressedについても設定してみたいと思います。

とりあえずは認識したので、よかったです。

HiroshiSatohさま、melonmanさま
長い間対応していただき本当にありがとうございました。

0 Karma

melonman
Motivator

こちらこそ!

もし回答に問題がなければ、回答の横のチェックマークをクリックしていただければ、解決済みとなりますので、チェックいただけると嬉しいです。

0 Karma

HiroshiSatoh
Champion

SSLのエラーに変わってますね。「元うなぎ屋」さんのブログが参考になりませんか?

0 Karma

Masahito
Engager

UF側

ERROR TcpInputFd - SSL Error = error:140760FC:SSL routines:SSL23GETCLIENTHELLO:unknown protocol

ERROR ExecProcessor - message from "/opt/splunkforwarder/etc/apps/SplunkTA_nix/bin/lastlog.sh" awk: run time error: negative field index $-2

0 Karma

Masahito
Engager

splunkd.logのエラー内容が変わってました。

IDX側

ERROR TcpInputProc - Failed to resurrect 70 byte message! from src=192.168.127.137:55516
ERROR S2S - Mismatch in configuration between forwarder and indexer. Expecting uncompressed data, but forwarder configured to send compressed data
ERROR TcpInputProc - Received unrecognized signature --splunk-cooked-mode-v2--:C! from src=192.168.127.137:55518

0 Karma

HiroshiSatoh
Champion

Receiver側を見つけられてないですね。melonmanさんのレスで再確認を!

0 Karma

melonman
Motivator

Windows7をIndexer(IDX), CentOSをUniversal Forwarder(UF)として、設定する際のざっくりとしてた手順は以下の流れです。

  1. Win7にSplunkをインストールし、Unix Appもインストール、Splunkの再起動
  2. Win7上で受信ポートをOpen(9997)
  3. CentOSにUFをイントールし, outputs.conf(etc/system/local以下など)を作成編集して、データ転送の設定をして、再起動して有効化

    [tcpout:group1]
    server=172.16.220.128:9997

  4. TA for UnixをCentosにインストール(tar -xvf でetc/apps以下に展開)し、Splunk_TA_nix/local以下で、apps.conf(taの有効化)と、inputs.conf(データ取り込み設定の有効化)を設定し、ufを再起動

    # pwd
    /opt/splunkforwarder/etc/apps/Splunk_TA_nix/local

    # cat app.conf
    [install]
    is_configured = true

    # cat inputs.conf | head -10
    [script://./bin/vmstat.sh]
    disabled = 0

    [script://./bin/iostat.sh]
    disabled = 0

    [script://./bin/ps.sh]
    disabled = 0
    ...つづく

以上で、設定は完了なのですが、確認するポイントは、手順3でしょうか。
CentOSからWindowsにデータを転送する設定がされているか確認してみてください。

Win7上のSplunkから、以下をサーチしてみて、Win7以外からのHostが見えているか確認してみるのも簡単な確認方法です。

index=_internal | stats count by host

    host            count
--- --------------- -----   
1   WIN-DEEFAFD6BQ8 15305
2   centos          708

確認してうまくいかないようでしたら、追加commentしてみてくださいませ。

0 Karma

melonman
Motivator

Compressedをしていしているので、Indexer側(Win7)側のinputs.confの[splunktcp:9997]の設定が入っている所にも、Compressedの設定を入れる必要がありあますね。
設定ファイルの詳細仕様は、$SPLUNK_HOME/etc/system/README 以下にはいっていますので、参考にしてみてください。

それか、一旦compressを外してみてためしていただければと。
おそらく/var/log/messagesも監視されているとおもうので、loggerで適当なメッセージをいれれば、Seach画面にすぐでてくるとおもいますよ。

-- outputs.conf.spec

compressed = [true|false]
* Applies to non-SSL forwarding only. For SSL useClientSSLCompression setting is used.
* If true, forwarder sends compressed data.
* If set to true, the receiver port must also have compression turned on (in its inputs.conf file).
* Defaults to false.

0 Karma

Masahito
Engager

返信ありがとうございます。

手順1,2は記述のとおりです。

手順3を参考に確認しました。 インストール時に設定しましたが、以下のとおりになっています。

[tcpout]

defaultGroup = default-autolb-group

[tcpout:default-autolb-group]

server = 192.168.127.128:9997 compressed = true

[tcp-server://192.168.127.128:9997]

手順4を参考に確認したところSplunkTAnix/local以下に apps.confが存在しなかったので、ここでも記述どおりに作成しました。inputs.confについては記述のとおりになっていました。

IDX、UF両方とも再起動をかけましたが、Ubuntu(Forwarder)が見つかりませんでした。

Win7上のSplunkから、index=_internal | stats count by hostでサーチしてみましたが、Ubuntuは表示されませんでした。

うまくいかないようです。ほかにはどんな問題が考えられますか?

0 Karma

Masahito
Engager

Forwarder側のsplunkd.logを確認したところ、以下のエラーが5分ごとに出ていました。

08-23-2013 15:10:07.569 +0900 ERROR TcpOutputProc - Can't find or illegal IP address or Name: splunk.example.jp
ちなみにReceiver側のSplunk サーバー名 はsplunk.example.jpになっています。
助言お願いします。

0 Karma

HiroshiSatoh
Champion

「splunkd.log」等に何かエラーが出力されてませんか?

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...