I’ve had this script kicking around for a while now, but never get around to publishing it… in the interest of getting it done, this post will be brief.
You may be aware that in Splunk 4.1, we introduced a completely rewritten Tailing Processor (the component that handles file monitor inputs). The rewrite included a prototype REST endpoint that provides realtime status of the Tailing Processor’s activities. It can be seen at https://localhost:8089/services/admin/inputstatus/TailingProcessor:FileStatus (on a stock installation), but quickly becomes unreadable with a large number of files being monitored.
The script (linked below) summarizes all of the entries at the endpoint, as such:
Some quick details about the output:
Things can look a bit more interesting if you catch a large file in progress. Here, we have a ~1GB file at 10% completion – as the tool refreshes, this percentage will adjust accordingly:
Unix: /opt/splunk/bin/splunk cmd python /path/to/fileStatus.py
Windows: c:\program files\splunk\bin\splunk cmd python c:\temp\fileStatus.py
Better late than never, yes?
----------------------------------------------------
Thanks!
Amritpal Bath
The world’s leading organizations rely on Splunk, a Cisco company, to continuously strengthen digital resilience with our unified security and observability platform, powered by industry-leading AI.
Our customers trust Splunk’s award-winning security and observability solutions to secure and improve the reliability of their complex digital environments, at any scale.