Splunk Search

How to count two file paths?

meisjen26
Engager

I'm very new to spiunk so bare with me. I'm trying to count the number of events on two seperate file paths and have them display in a table in sep fields. So far, I include FullFilepath="*:\*" and I exclude the particular paths I'm not interested in... for example.... FullFilePath!="E:\*" ...therefore in my search, I return a count of all filepaths that are not E.

What I would like to do is include the count for both E: file paths and non E:..but in seperate fields. Can anyone provide an example on how to do this? or a good direction? Thanks!

Tags (3)
0 Karma
1 Solution

woodcock
Esteemed Legend

Like this:

... | stats count(eval(FullFilePath="E:*")) AS ECount count(eval(FullFilePath!="E:*")) AS OtherCount

View solution in original post

woodcock
Esteemed Legend

Like this:

... | stats count(eval(FullFilePath="E:*")) AS ECount count(eval(FullFilePath!="E:*")) AS OtherCount

meisjen26
Engager

thanks a lot

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...