Reader small image

You're reading from  Splunk 7.x Quick Start Guide

Product typeBook
Published inNov 2018
PublisherPackt
ISBN-139781789531091
Edition1st Edition
Tools
Right arrow
Author (1)
James H. Baxter
James H. Baxter
author image
James H. Baxter

James H Baxter is the owner/CEO of Machine Data Insights, Inc., a certified Splunk architect, and a developer and machine learning practitioner with over 35 years of experience in various engineering and analysis disciplines, including radio/satellite; networks; capacity and performance modelling; speech technology; packet-level analysis; programming; and Splunk architecture, administration, and machine learning solutions for companies including MCI, IBM, BP, Disney, and AMEX. James is also a private pilot and holds an Extra class amateur radio and FCC Radiotelephone license. You can reach him at LinkedIn at James H. Baxter.
Read more about James H. Baxter

Right arrow

Creating an alert

Let's build an alert that notifies us when available disk space falls below 15% of the total capacity so we can avert any issues that can be caused by running out of disk space.

First, create a search (in Search & Reporting) using a modification of the SPL we used to create the disk usage report earlier in this chapter, as shown in the following code:

| rest services/server/status/partitions-space
| eval pct_disk_free=round(available/capacity*100,2), pct_disk_used=round(100-(available/capacity*100),2)
| eval disk_capGB=round(capacity/1024, 3), disk_availGB=round(available/1024, 3), disk_usedGB = disk_capGB - disk_availGB
| where pct_disk_free <= 15
| table splunk_server disk_capGB disk_usedGB disk_availGB pct_disk_used pct_disk_free

Note the use of the where command to filter only the events where the calculated available disk space is less than or equal...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Splunk 7.x Quick Start Guide
Published in: Nov 2018Publisher: PacktISBN-13: 9781789531091

Author (1)

author image
James H. Baxter

James H Baxter is the owner/CEO of Machine Data Insights, Inc., a certified Splunk architect, and a developer and machine learning practitioner with over 35 years of experience in various engineering and analysis disciplines, including radio/satellite; networks; capacity and performance modelling; speech technology; packet-level analysis; programming; and Splunk architecture, administration, and machine learning solutions for companies including MCI, IBM, BP, Disney, and AMEX. James is also a private pilot and holds an Extra class amateur radio and FCC Radiotelephone license. You can reach him at LinkedIn at James H. Baxter.
Read more about James H. Baxter