Splunk Search

Combining search statements

honobe
Explorer

For each subject in the search sentence, the count number is displayed.
In addition to the information currently being displayed, I want to display the attached file name for each subject.

The search sentence you are using is below.
※ Partially omitted

index=xxxxx
| lookup ~ommitted~
| stats count ~ommitted~ by subject

Can I display the attached file name by adding it to the search sentence that is counting?

-image-

Subject | Number | attached file name | Number of Mail with Attachment

AAAA | 100 | aaaa | 10
BBBB | 50 | none | 0
CCCC | 200 | cccc | 200

In the current search searches, only the subject line and number of items are displayed.
*I want to display none if there is no attached file.

0 Karma
1 Solution

DalJeanis
Legend

try...
| eval filename=coalesce(filename, "none")
| stats count values(filename) as filename by subject

View solution in original post

0 Karma

DalJeanis
Legend

try...
| eval filename=coalesce(filename, "none")
| stats count values(filename) as filename by subject

0 Karma

honobe
Explorer

Thanks to your answer, I was able to solve the problem.

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...