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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...