Does anyone know if I can use nagios to do a file count on a directory on a Windows 2003 Server and set off a warning if the number of files is greater than x? I Have installed Net_NC on the Server. Can i do this with the plugin check_nt? When jes, what are the params to check?
I don’t know the direct answer to your questions, but here is what i did:
I installed NRPE_NT (or NSClient++)
I wrote a vbs script that does what you want
If you don’t know vbs you can download a windows port of the ‘wc’ unix command such as you might find at openetwork.com/berk.html and write a one-liner batchfile that pipes a bare format directory listing through it using the linecount switch, like “dir c: /B | wc -l”… but you’ll still have to install the NRPE client as loose indicated, plus write a rudimentary plugin at the nagios end to call the batchfile through NRPE and evaluate whether the numerical response is > threshold…
swings and roundabouts…