Splunk Search

What command can I use to speed up my search besides join command?

same
Engager

I am trying to extract only the top values ​​from fields such as argument, uri, and method for the WAF log.
Currently, it is configured using a join statement, but the search speed is very slow,
so I am looking for another method.
Please give me a hint on the searchstatement that can retrieve the top values ​​in each field at once.

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @same ,

as @bowesmana said, use stats to join the two searches.

join is a very slow command that is used mainly by people that come from databases, but Splunk isn't a database, it's a search engine, so the logic is completely different.

You have to create a stats command correlating the data from the two Data Sources using the "BY correlation_key" clause and visualizing the fields you need using the options for stats.

Ciao.

Giuseppe

View solution in original post

Tags (1)

gcusello
SplunkTrust
SplunkTrust

Hi @same ,

as @bowesmana said, use stats to join the two searches.

join is a very slow command that is used mainly by people that come from databases, but Splunk isn't a database, it's a search engine, so the logic is completely different.

You have to create a stats command correlating the data from the two Data Sources using the "BY correlation_key" clause and visualizing the fields you need using the options for stats.

Ciao.

Giuseppe

Tags (1)

same
Engager

Thanks for the hint to solve the problem

Tags (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Use stats instead of join or top, e.g.

| top argument uri method

Please provide an example of what you've got so far, so we can help optimise

Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...