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!

.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 ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...