Alerting

monitor empty folder, alert when there is file

newbiesplunk
Path Finder

Hi,
I wish to create an monitor folder alert such that it will trigger the alert when there is at least one file in the folder. I do not want to index any file that found in this folder. thks

Tags (1)
0 Karma

MuS
SplunkTrust
SplunkTrust

Hi newbiesplunk,

I don't think that's possible in Splunk. If you setup a directory monitor Splunk will index all files in that directory except those which are excluded by blacklisted ... but then again you will not be able to search for them in Splunk and therefore you will not be able to setup an alert.

My suggestion: write a shell script which will be fired by cron and sends an email if there is something in this directory.

cheers, MuS

0 Karma

MuS
SplunkTrust
SplunkTrust

One of the Main functionalty of splunk relies on indexing human readable Data. I don't know of any Way of Not indexing something and do the usual splunk Magic on this nothing....

0 Karma

newbiesplunk
Path Finder

thks, i dont really know how to write shell script but i believe splunk is powerful app that can do this simple job thru some search or config, it just that i dont know how. Any other suggestion? thks

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!

Laser Bananas and Edge Hubs: Exploring Operational Technology (OT) Data Through a ...

  OT is a different environment to traditional IT and can have interesting challenges when interfacing the ...

Event Series: Mastering AI Tokenomics and Splunk Agent Observability

Beyond the Black Box: Correlating AI Performance and Tokenomics with Splunk Agent Observability   As ...

span_metrics: The OpenTelemetry-Idiomatic Way to See Inside Your Services

You open a trace in Splunk Observability Cloud and everything looks fine. One root span, order-pipeline, with ...