I need to implement a monitor that will watch a particular directory on a Windows server, and alert if any files within this spool directory become older than a specified time. I'm currently handling this by using the Zabbix UserParameter option within my Windows Zabbix agent, and calling a Nagios plugin called check_winfile. This does what I need, but, I would prefer to handle using a Zabbix delivered function. Will Zabbix do this? I've been unable to find a Zabbix item that will provide this functionality. Thanks
Ad Widget
Collapse
Monitor a directory for files older than X minutes
Collapse
X
-
If there are just some specific file names, you could use vfs.file.time[file,<mode>], otherwise you would need to use a user parameter as you are.
Doing just a quick search (haven't tested anything) You could change your user parameter to something like the following if you need a count of the directory.
forfiles /d -1 | find /C "" -
Thanks for the reply. Unfortunately the Windows forfiles command doesn't deal with minutes easily. I need to find files older than X minutes, not days. And if I'm going to write scripting to handle this, I may as well just reuse what has already been done, (check_winfile). Also, I won't always know the file names, so I need to alert if any files within a particular directory are older than X minutes.Comment
-
Have you resolved that? I'm facing the same problem. Thank You.Thanks for the reply. Unfortunately the Windows forfiles command doesn't deal with minutes easily. I need to find files older than X minutes, not days. And if I'm going to write scripting to handle this, I may as well just reuse what has already been done, (check_winfile). Also, I won't always know the file names, so I need to alert if any files within a particular directory are older than X minutes.Comment
Comment