Dashboards & Visualizations

Remove unwanted subfolders in dashboard

thaara
Explorer

Hi Splunkers,

We are getting unwanted sub folders when we search for a particular sub folder

I am creating a query which displays the file system for a particular folder. But I am getting all the folder names instead of a particular folder name alone.

Consider, in server xyz, we are having n number of file system (example, /, /var, /var/abc, /var/abc/cde, etc. ). When I am searching for /var alone by giving that in query, it displays /var and all the sub folders in it. But that is not as expected.

Query:
index=" " sourcetype= " " mn=/ OR /var | eval Usage=replace(Used,"%","") | timechart values(usage) as Used by mn

note: mn means the file system name

Expected output:
Chart should show only / and /var file systems.

Output we are getting now:
Chart should show only / and /var and /var/abc and /var/abc/cde

Labels (1)
0 Karma

niketn
Legend

@thaara if you are using the following query I dont see how other subfolder will show up as you have not used * in the mn filter

 index=" " sourcetype= " " mn IN ("/","/var") 
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

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 ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...