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!

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Community Feedback

We Want to Hear from You! Share Your Feedback on the Splunk Community   The Splunk Community is built for you ...

Manual Instrumentation with Splunk Observability Cloud: Implementing the ...

In our observability journey so far, we've built comprehensive instrumentation for our Worms in Space ...