Splunk Search

日本語を含むデータ入力の設定方法を教えて下さい

bananaman
Path Finder

取り込みたいログデータがシフトJISなどの日本語エンコーディングとなっております。
この際、データ入力時にどのような設定をすれば良いですか?

Tags (1)
0 Karma
1 Solution

bananaman
Path Finder

Splunkは基本UTF-8エンコーディングにてデータを収集しますが、ソースがUTF-8以外である場合は
ソースのエンコーディングを明示することにより、収集時にUTF-8へ変換し格納することが出来ます。

http://docs.splunk.com/Documentation/Splunk/5.0/data/Configurecharactersetencoding

UIによる設定方法は、データの追加>データプレビュー時のAdvanced mode (props.conf) に
または、props.conf の該当スタンザへ直接以下のパラメータを追記します。

※シフトJISの場合
[TestData_SJIS]
CHARSET=SHIFT-JIS

※EUC-JPの場合
[TestData_EUC]
CHARSET=EUC-JP

その他のエンコーディングについては上記KBリンクを参照してみてください。

View solution in original post

0 Karma

takashismi
New Member

UTF-8かどうかの判定は、たとえば、頭OO文字で判断、といったルールがあるのでしょうか?

0 Karma

melonman
Motivator

少し情報が古いですが、こちらが参考になるかと思います。

http://splunk-base.splunk.com/answers/6341/international-character-code-recognition

0 Karma

bananaman
Path Finder

Splunkは基本UTF-8エンコーディングにてデータを収集しますが、ソースがUTF-8以外である場合は
ソースのエンコーディングを明示することにより、収集時にUTF-8へ変換し格納することが出来ます。

http://docs.splunk.com/Documentation/Splunk/5.0/data/Configurecharactersetencoding

UIによる設定方法は、データの追加>データプレビュー時のAdvanced mode (props.conf) に
または、props.conf の該当スタンザへ直接以下のパラメータを追記します。

※シフトJISの場合
[TestData_SJIS]
CHARSET=SHIFT-JIS

※EUC-JPの場合
[TestData_EUC]
CHARSET=EUC-JP

その他のエンコーディングについては上記KBリンクを参照してみてください。

0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

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