Monitoring Splunk

Monitoring console: Splunk Indexer Serves status

riqbal47010
Path Finder

I can see the total number of servers against resource Usage: Deployment:

It is showing me 10 out of 12 as two server are out of service due to disk issue.
below ist he initial search:

| rest /services/server/status/partitions-space splunk_server="*-ID-*" 
        | eval free = if(isnotnull(available), available, free)
        | eval usage = round((capacity - free) / 1024, 2)
        | eval capacity = round(capacity / 1024, 2)
        | eval compare_usage = usage." / ".capacity
        | eval pct_usage = round(usage / capacity * 100, 2)
        | stats first(fs_type) as fs_type first(compare_usage) AS compare_usage first(pct_usage) as pct_usage by splunk_server,mount_point        
        | rename mount_point as "Mount Point", fs_type as "File System Type", compare_usage as "Disk Usage (GB)", pct_usage as "Disk Usage (%)"

===============
below are sample of result:
splunk_server Mount Point File System Type Disk Usage (GB) Disk Usage (%)
A /opt/splunk ext4 7 / 8 89.32
B /opt/splunk ext4 7 / 8 89.32
C /opt/splunk ext4 7 / 8 89.32
D /opt/splunk ext4 7 / 8 89.32
E /opt/splunk ext4 7 / 8 89.32
F /opt/splunk ext4 7 / 8 89.32
G /opt/splunk ext4 7 / 8 89.32
H /opt/splunk ext4 7 / 8 89.32
I /opt/splunk ext4 7 / 8 89.32

J /opt/splunk ext4 7 / 8 89.32

total number of resutls are 10. whereas actual servers are 12.
so now I want to trigger the alert if count of result !=12

Tags (1)
0 Karma

woodcock
Esteemed Legend

Just add this to the bottom:

... | eventstats count | where count<12

Then set your alarm trigger for Number of results and Greater than 0.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...