Splunk Search

tokenize on space and show only 1st part of starting

avikc100
Path Finder

I am getting result like this.

 

avikc100_0-1736198103983.png

query:

index="webmethods_prd" host="USPGH-WMA2AISP*" source="/apps/WebMethods/IntegrationServer/instances/default/logs/SmartIST.log" |stats count by SmartISTINTERFACE

instead of above I want a report like this:

avikc100_1-1736198297401.png

 

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index="webmethods_prd" host="USPGH-WMA2AISP*" source="/apps/WebMethods/IntegrationServer/instances/default/logs/SmartIST.log" 
| eval Interface=mvindex(split(SmartISTINTERFACE," "),0)
|stats count by Interface

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @avikc100 ,

otherwise the solution from @ITWhisperer you could use the rex command:

index="webmethods_prd" host="USPGH-WMA2AISP*" source="/apps/WebMethods/IntegrationServer/instances/default/logs/SmartIST.log" 
| rex field=SmartISTINTERFACE "^(?<SmartISTINTERFACE>[^ ]+)"
| stats count by SmartISTINTERFACE

Ciao.

Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @avikc100 ,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated by all the contributors 😉

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

index="webmethods_prd" host="USPGH-WMA2AISP*" source="/apps/WebMethods/IntegrationServer/instances/default/logs/SmartIST.log" 
| eval Interface=mvindex(split(SmartISTINTERFACE," "),0)
|stats count by Interface
0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco &#43; Splunk! We’ve ...