Getting Data In

日本語文字列に対するSEDCMDについて

sunrise
Contributor

WMIポーリングで取得したWindowsイベントログをSEDCMD属性で置換したいのですが、
下記のprops.confを設定してもうまく置換されません。
何か対応方法ございますでしょうか。

<props.conf>

[WMI:WinEventLog:Security]
SEDCMD-win = s/ログオン/ログオンです/g

ちなみに英語の場合には置換することが出来ました。

0 Karma
1 Solution

melonman
Motivator

Windows環境ではない(Macosのローカルファイル)ですが、SJISでデータを取り込む際、props.conf内で、SEDCMDでIndex-timeトランスフォームを設定して見たところ、SEDが聞いた状態でイベントが取り込まれました。(想定通り)

すでに取り込まれたデータに対しては、rex mode=sed "s/xxx/yyy/g"などとしていただければサーチ時の変換は可能かと思いますが、いかがでしょうか。

元データ

alt text

Props.conf

[sjis]
CHARSET = SJIS
NO_BINARY_CHECK = 1
pulldown_type = 1
SEDCMD-win = s/ログオン/セッドでログオンです/g

Splunkに取り込までたあとの表示

alt text

View solution in original post

0 Karma

melonman
Motivator

Windows環境ではない(Macosのローカルファイル)ですが、SJISでデータを取り込む際、props.conf内で、SEDCMDでIndex-timeトランスフォームを設定して見たところ、SEDが聞いた状態でイベントが取り込まれました。(想定通り)

すでに取り込まれたデータに対しては、rex mode=sed "s/xxx/yyy/g"などとしていただければサーチ時の変換は可能かと思いますが、いかがでしょうか。

元データ

alt text

Props.conf

[sjis]
CHARSET = SJIS
NO_BINARY_CHECK = 1
pulldown_type = 1
SEDCMD-win = s/ログオン/セッドでログオンです/g

Splunkに取り込までたあとの表示

alt text

0 Karma

sunrise
Contributor

Windows環境でも無事SEDCMD属性が使えました。やはり、props.confの文字コードが原因でした。Windows Server上にSplunkを構築する際には設定ファイル(conf)を全てUTF-8で保存する癖をつけないとダメですね。。。

0 Karma

sunrise
Contributor

別の方法(props.confとtrasnforms.conf)で検証していたところ、設定ファイルの文字コードがUTF-8である必要がありそうです。

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...