Splunk Search

index=os source=df

Splunk_U
Path Finder

When executing the search "index=os source=df" it is gvng me the data for /dev/ammper/system-root and /dev/sda...is there is a way that I can get the data only for /dev/mapper/system-root????

Tags (1)
0 Karma

mikelanghorst
Motivator

index=os source=df "/dev/mapper/system-root" | multikv | search Filesystem="/dev/mapper/system-root"

will return only that single line.

*minor edit to add "search" before Filesystem

0 Karma

mikelanghorst
Motivator

multikv is just responsible for taking a table set of results, and splitting them into individual lines and field extracting.

Without the multikv, it will return the full df output. With it, just the single line.

0 Karma

Splunk_U
Path Finder

I dont understand why have you given multikv where you have not given anf feilds with that? For me index=os source=df Filesystem="/dev/mapper/system-root" has given me the result set that I wanted

0 Karma

mattwesthoff
New Member

Just add "/dev/mapper/system-root" to your search!

index=os source=df "/dev/mapper/system-root"

(If you only want to match that path in a specific field obviously just put field=/dev/mapper/system-root)

0 Karma

Splunk_U
Path Finder

Yes...I have used Filesystem=/dev/mapper/system-root and it is working fine now

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...