Splunk Search

How to create a table for mount point space?

tmarlette
Motivator

I am attempting to build a search which shows the available space for the Unix mount that I desire. These are the standard 'OS' level mount points that I am targeting.

I am attempting to get the column headers to look like this:

host, /, /tmp, /usr/local, /boot
<myhost>,90%,75%,80%,50%

Currently the search i have working is the following:

index=my_index sourcetype=df mount="/" OR mount="/usr/local" OR mount="/opt/" OR mount="/var" OR mount="/tmp" OR mount="/boot" OR mount="/dev" | stats latest(PercentFreeSpace) as "space" by host,mount

This provides the column headers and result set to be as so:

host, mount, space
hostname, /, 70%
hostname,/tmp, 80%

I thought I could maybe use the 'xyseries' function to do this, or maybe the chart function, but I haven't been able to figure it out.

does anyone have any ideas on how to create this in a table?

Tags (3)
0 Karma
1 Solution

tmarlette
Motivator

I figured this one out. See below:

index=my_index sourcetype=df mount="/" OR mount="/usr/local" OR mount="/opt/" OR mount="/var" OR mount="/tmp" OR mount="/boot" OR mount="/dev" | chart latest(PercentFreeSpace) as "space" over host by mount

This is using the default data inputs / field extractions from the Linux TA and Unix app.

View solution in original post

tmarlette
Motivator

I figured this one out. See below:

index=my_index sourcetype=df mount="/" OR mount="/usr/local" OR mount="/opt/" OR mount="/var" OR mount="/tmp" OR mount="/boot" OR mount="/dev" | chart latest(PercentFreeSpace) as "space" over host by mount

This is using the default data inputs / field extractions from the Linux TA and Unix app.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...