Getting Data In

Monitor File Size

hartfoml
Motivator

My IDS system uses a file called snort.u2.xxxx.
this file roles over every night during a service restart and starts at 0 size after the restart of the service.
I have had a problem when the Snort service restarts that sometimes this file hangs.

I want to be alerted if this file does not grow beyond a certain size in a given time.
Then I want the alert to restart the Snortd service and monitor again for a given time and size.

Anyone have any ideas how I can do this

Tags (2)
0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

Using a fschange input might be helpful here. By monitoring the file, and setting the option "sendEventMaxSize = N" then when the input checks the file, it will only send the contents of the file upto N bytes. If no content is sent, then you have progress. Not exactly what you are looking for, but without a perl/bash/python/etc script, I don't think it's possible. That is the other option, by the way. Write a scripted input to output the filesize of the file, and perform your search on that input.

http://docs.splunk.com/Documentation/Splunk/5.0/Data/Monitorchangestoyourfilesystem
http://docs.splunk.com/Documentation/Splunk/5.0/admin/inputsconf

View solution in original post

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Using a fschange input might be helpful here. By monitoring the file, and setting the option "sendEventMaxSize = N" then when the input checks the file, it will only send the contents of the file upto N bytes. If no content is sent, then you have progress. Not exactly what you are looking for, but without a perl/bash/python/etc script, I don't think it's possible. That is the other option, by the way. Write a scripted input to output the filesize of the file, and perform your search on that input.

http://docs.splunk.com/Documentation/Splunk/5.0/Data/Monitorchangestoyourfilesystem
http://docs.splunk.com/Documentation/Splunk/5.0/admin/inputsconf

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...