Splunk Search

How to check the size of a file on Unix that gets created daily (but not indexed) using a Splunk search?

harshavmb
New Member

I have a file which gets created daily. My requirement is to get the size of the file using a splunk search. The file system is in Unix OS.

Help is much appreciated!!!

Tags (4)
0 Karma
1 Solution

lguinn2
Legend

You can create a scripted input to do this. For many UNIX systems, the following script should work:

#!/bin/sh
ls -lsk absolutepathtoyourfile

Put this script in an appropriate directory and then set up the scripted input. Have the script run once per day. Documentation is here.

HTH!

View solution in original post

lguinn2
Legend

You can create a scripted input to do this. For many UNIX systems, the following script should work:

#!/bin/sh
ls -lsk absolutepathtoyourfile

Put this script in an appropriate directory and then set up the scripted input. Have the script run once per day. Documentation is here.

HTH!

harshavmb
New Member

Thanks a lot..!!! Much appreciated..

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...