Getting Data In

How to continuously monitor a file in splunk even though it is not updated

shreyasathavale
Communicator

I want to monitor a cfg/csv file daily. The file does not get updated daily, it gets updated once a month or once a quarter.
Can splunk monitor/read the file daily so that i don't have to specify timestamp like earliest=30d or earliest=90d

File does not have a datetime stamp in it.

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

A monitor input will read changes to files as they happen. Splunk will read your csv file in its entirety the first time it is seen and then will read only new data every month or quarter.

To read the file every day, consider writing a python script that reads the file and writes it to stdout. Then set up that script as a scripted input scheduled daily. Keep in mind reading the same data every day will increase your license consumption and put duplicated data into your index.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

A monitor input will read changes to files as they happen. Splunk will read your csv file in its entirety the first time it is seen and then will read only new data every month or quarter.

To read the file every day, consider writing a python script that reads the file and writes it to stdout. Then set up that script as a scripted input scheduled daily. Keep in mind reading the same data every day will increase your license consumption and put duplicated data into your index.

---
If this reply helps you, Karma would be appreciated.
0 Karma

oscar84x
Contributor

How are you currently inputting the data from the file into Splunk? Are you doing a monitor stanza in inputs.comf? That's all you should need.

0 Karma

shreyasathavale
Communicator

yeah, but wanted to continuously monitor it

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...