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.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...