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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...