Splunk Search

I'm new to splunk queries and how to create an alert using Linux commands on Splunk?

Vin
Engager

I need to write a Splunk alert to check number of connections on a server. Using below Linux command I can get the results on the server. But help me out in creating an alert on Splunk with the command.

ps -ef | grep '[s]shd' | grep -v ^root | grep -i file* | wc -l

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

That's a pretty straightforward query in Splunk.  However, do you have the equivalent to "ps -ef" logged in Splunk?  If not, then the alert won't work.

Another option is to create a scripted input that executes that CLI command and logs the result in Splunk.  Then you can alert on it.

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...

Getting Started with Splunk Artificial Intelligence, Insights for Nonprofits, and ...

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