Is there a check command that when passed a file path on a windows share (or UNC path) that can tell if it sees more files than the last time it was called ?
For example, the first time its called on a path eg: \\server1\share\accounting would report that the file count has changed from 0 to (lets say) 100 current files. (Because the first time it was called with that path would recognize that there was no previous calls that had a count of files)
Its called again and sees the same number of files would indicate 'no chang'e in file count.
Another file gets added.
Its called again and see the number of files increased by 1 it would then report that additional files had been added
Is there such a check command?
Tom
Check command for noticing file count changes
-
tmattingly
- Posts: 115
- Joined: Thu Oct 23, 2014 12:53 pm
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Check command for noticing file count changes
There are a lot of plugins that do file counts, but a change difference is not common.
You may have to write a wrapper script that executes the plugin that does the counting, and then stores / compares the result in a temp file.
NSClient++ has the file counting capabilities, you just need to write the wrapper script:
http://sites.box293.com/nagios/guides/c ... es-folders
Perhaps you might find something on the Nagios Exchange:
https://exchange.nagios.org/directory/S ... le%20count
You may have to write a wrapper script that executes the plugin that does the counting, and then stores / compares the result in a temp file.
NSClient++ has the file counting capabilities, you just need to write the wrapper script:
http://sites.box293.com/nagios/guides/c ... es-folders
Perhaps you might find something on the Nagios Exchange:
https://exchange.nagios.org/directory/S ... le%20count
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.