Hi
I need to monitor a directory and by end of the day i want to check if there are n number of files. if numbers files is greater/less than n in that directory i need to raise an alert. Can this be done in splunk. Can anyone help me?
Hello
You could use an scripted input.For example, in linux, you shoud create a .sh file, with something like:
ls -lart /thepath/youwant/tomonitor | wc -l
Then the output of this script will be a number, thats the number of files in that directory. So you need to create a inputs.conf in your UF, with an script stanza calling to the .sh file at the schedule you need.
Once you have the data indexed, you only need to setup the alerts you want monitoring the values of the files.
Regards
Hello
You could use an scripted input.For example, in linux, you shoud create a .sh file, with something like:
ls -lart /thepath/youwant/tomonitor | wc -l
Then the output of this script will be a number, thats the number of files in that directory. So you need to create a inputs.conf in your UF, with an script stanza calling to the .sh file at the schedule you need.
Once you have the data indexed, you only need to setup the alerts you want monitoring the values of the files.
Regards
That is an interesting approach. What if I'd like to compare the result to a previous day's result, alert if the number is smaller (I'm missing files) and list the missing files?
Thanks,
Thnx. Need to check and learn scripted inputs..