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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...