Ok, I'll take a look at the check_smb_share. I'm kind of hoping to do something in
Windows, though.
I've been looking at other plugins in the
Nagios Exchange. There's one PowerShell script that looks promising but I don't know PowerShell at all and it looks like it has a steep learning curve. Since this script (
check_windows_files.ps1) does way more than I need it to, I could probably just extract the 'checkFileExists' parts and work with that.
With the .bat and .vbs plugins I created, Nagios is able to display the "\\server\directory" fine in the status line, but it doubles the backslashes everywhere else including when it's used with the DIR command (anywhere but the local C drive).
This is clearly a bug that should be addressed. I would think it's very common to include such an address in a plugin. Also, I wonder why the plugin isn't just executed "as is" with Nagios using nothing but the output text and the exit code.
One more thing: the sample NCPA plugins here:
https://support.nagios.com/kb/article/n ... a-722.html
aren't very useful. With these, it's like you have to get the answer first and then give it to the plugin (./check_dummy.sh 2 Something_is_CRITICAL).