Splunk Search

いくつかのvalueを一つにまとめたい

appleman
Contributor

nameというフィールドに、同じappAという名前が、「app A」、「app a」、「App A」などのようにいくつかvalueの入力方法が異なってしまい、stats countした際に別のものとして認識されてしまいます。
eval case()とかで指定すると、他の正常に入ってきているデータが省かれてしまうので、
他にうまくまとめる方法はございますでしょうか。

Tags (3)
0 Karma
1 Solution

melonman
Motivator

以下、一旦小文字に変換してから count してますが、どうでしょうか。

... | eval yourfield=lower(yourfield) | stats count by yourfield

View solution in original post

0 Karma

melonman
Motivator

以下、一旦小文字に変換してから count してますが、どうでしょうか。

... | eval yourfield=lower(yourfield) | stats count by yourfield
0 Karma

appleman
Contributor

これだけだと、nameの中にあるスペースの有無や、日本語と英語で書かれているものを別のものと認識したままになってしまいます。。。。
(例:日本語でグーグルと入っているものと英語でGoogleと入っているものも名前は一緒なので1つのものとしてカウントさせたいです)

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...