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!

Announcing Scheduled Export GA for Dashboard Studio

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

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 GA in US-AWS!

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