Splunk Dev

Splunk App for UnixでCPU使用率などが取得できない

shozawa
Explorer

win10でsplunkを利用しています。

Linuxサーバとの通信はできているようなのですが、Splunk App for UnixでCPU使用率などの情報が表示されません。
Linuxサーバ側のsplunkd.logには、

04-24-2018 16:40:02.239 +0900 WARN FileClassifierManager - The file '/var/log/sa/sa24' is invalid. Reason: binary
04-24-2018 16:40:02.239 +0900 INFO TailReader - Ignoring file '/var/log/sa/sa24' due to: binary

と出力されています。

対処法をご教示頂けないでしょうか。よろしくお願い致します。

0 Karma

HiroshiSatoh
Champion

Splunk App for Unixは本体をSplunkサーバ(サーチヘッド)に入れただけでは動きません。SplunkサーバとLinuxサーバ両方に「Splunk Add-on for Unix and Linux」をインストールして下さい。SplunkサーバはSplunk WEBからインストールできます。Linuxサーバ側は手動でインストールして下さい。

インストール後Linuxサーバ側の/Splunk_TA_nix/local/inputs.confを編集して下さい。

例えば、cpuの情報を取りたい場合は以下のようにdisabled = falseと設定してlocalフォルダにinputs.confを保存して下さい。デフォルトはすべて無効です。

[script://./bin/cpu.sh]
disabled = false

あと、格納用のインデックスとしてosというインデックスが必要です。未作成ならば作成して下さい。

また、表示されているエラーはログファイルがバイナリファイルとみなされたためです。もしこのログを取得したいのであれば文字コートを確認してUTF-8以外の場合は文字コードの設定を入れて下さい。

0 Karma

p_gurav
Champion

Can you check index=os sourcetype=cpu? Is data is available in this sourcetype? Also check the permission of scripts?
Refer this:
https://docs.splunk.com/Documentation/UnixApp/5.2.3/User/TroubleshoottheSplunkAppforUnixandLinux

0 Karma

shozawa
Explorer

I am sorry, I can not understand it much.
Can I ask you a little more detail?

0 Karma

shozawa
Explorer

ごめんなさい、あまり理解できません…
もう少し詳しくおねがいできますか?

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...