Getting Data In

How to pick only non comma (",") related events and show in table?

akshayinnamuri
Loves-to-Learn Lots

Hi have a results from my mail index

say log look like below

sender=abc recipient=xyz@sample.com,ghi@nonsample.com country=abc

sender=def recipient=team@nonsample.com country=xyz

sender=gfh recipient=tip@nonsample.com country=efg

sender=abc recipient=none@sample.com,sample@nonsample.com country=pqr

I want to shows in a table only the non comma separated recipients only (as highlighted in bold where there are no multiple recipients)

 

can some one help me on this

 

Labels (2)
Tags (1)
0 Karma

akshayinnamuri
Loves-to-Learn Lots

Thanks all,
above didnt work..
however I tried 
| eval recipient=split(recipient,","), rec_count=mvcount(rcpt)
| where rec_count=1
|table ...

 

and got the result

0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @akshayinnamuri,

You can simply filter them by using below;

| search NOT sender=*,*
If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

I think @scelikok meant

| search NOT recipient=*,*
0 Karma

scelikok
SplunkTrust
SplunkTrust

Yes @ITWhisperer , thank you for correction

If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...