Splunk Search

how to keep sender name with space in search result

avikc100
Path Finder

I am using Splunk Enterprise Version: 9.1.0.1.

my search query is :

index="webmethods_prd" source="/apps/webmethods/integrationserver/instances/default/logs/USCustomerEDI.log" InterfaceName=USCUSTOMERPO Status=Success OR Status=Failure | eval timestamp=strftime(_time, "%F")|chart limit=30 dc(TxID) over Sender_ID by timestamp

in result I am getting incomplete Sender_ID, splunk removed space from Sender_ID

avikc100_0-1708478589514.png


but actually it should be full name , like this :

avikc100_1-1708478644765.png

How can I preserve the full Sender_ID here?

 

Avik

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

You have not shown how Sender_ID has been extracted. Having said that, you may need to re-extract it with a rex command, such as this:

| rex "Sender_ID=(?<Sender_ID>.+)\s Receiver_ID"

View solution in original post

0 Karma

avikc100
Path Finder

used rex "Receiver_ID =(?<Receiver_ID>.+)\s TxnType" and worked

0 Karma

avikc100
Path Finder

Sender_ID is present in log line:

2024-02-16 09:55:41:829 EST| INFO |InterfaceName=USCUSTOMERPO POCanonical_JSONHttpDataProcess=END JSON data successfully processed to Order Processor application for TxID=20240216095535623-0EEu Sender_ID=hC Bioscience Inc Receiver_ID=ThermoFisher Scientific TxnType=USCustomer_PO Format=cXML Direction=Inbound PO_Num=2550 Status=Success

 

avikc100_2-1708541547193.png

 

 

I have updated the query bit still space is truncated 


InterfaceName=USCUSTOMERPO Status=Success OR Status=Failure | eval timestamp=strftime(_time, "%F")|chart limit=30 dc(TxID) over Sender_ID by timestamp|rex "Sender_ID=(?<Sender_ID>.+)\s"

 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You have not shown how Sender_ID has been extracted. Having said that, you may need to re-extract it with a rex command, such as this:

| rex "Sender_ID=(?<Sender_ID>.+)\s Receiver_ID"
0 Karma

avikc100
Path Finder

Can you please help to extract Receiver_ID also, how should I regex it?

 

Receiver_ID ='Thermo Fisher Sci West Palm Beach' TxnType=

0 Karma

avikc100
Path Finder

Sender_ID is present in logging:
as example: 
2024-02-16 09:55:41:829 EST| INFO |InterfaceName=USCUSTOMERPO POCanonical_JSONHttpDataProcess=END JSON data successfully processed to Order Processor application for TxID=20240216095535623-0EEu Sender_ID=hC Bioscience Inc Receiver_ID=ThermoFisher Scientific TxnType=USCustomer_PO Format=cXML Direction=Inbound PO_Num=2550 Status=Success

 



please help to form the query :
i tried this but still the issue persist

it is taking only 1st word from log line 

avikc100_1-1708521074880.png

 

0 Karma
Get Updates on the Splunk Community!

Get Inspired! We’ve Got Validation that Your Hard Work is Paying Off

We love our Splunk Community and want you to feel inspired by all your hard work! Eric Fusilero, our VP of ...

What's New in Splunk Enterprise 9.4: Features to Power Your Digital Resilience

Hey Splunky People! We are excited to share the latest updates in Splunk Enterprise 9.4. In this release we ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...