Page 1 of 1

Plugin for window to check number of files in network drive?

Posted: Wed Oct 07, 2015 5:34 am
by Txiki
Hello:
New in this forum, and I am not sure if this is the right forum to ask for this question.
I have been for a vbs plugin in a Windows client to check how many files are there in a network folder.
When I do it locally it works fine, but when I try to check in a network drive which is mapped on same Windows Client it doesn't work, just it says path does not exist.
Our nagios is quite old 3.8
Any ideas how to check check it?
Thanks in advanced
Txiki

Re: Plugin for window to check number of files in network dr

Posted: Wed Oct 07, 2015 10:06 am
by hsmith
Can you post the command you are issuing to check? You may need to escape out some characters.

Re: Plugin for window to check number of files in network dr

Posted: Thu Oct 08, 2015 1:36 am
by Txiki
Hello.

The command I am using in nsc.ini is
check_files=cscript.exe //NoLogo D:\Nagios\scripts\check_files.vbs -r -p "N:\copia" -f "RegEx:copia*.*$" -w 1000 -c 2000
Where D:Local drive and N:Network drive

Thanks
Txiki

Re: Plugin for window to check number of files in network dr

Posted: Thu Oct 08, 2015 11:20 am
by jdalrymple
The problem is going to be that for the user executing the plugin (likely SYSTEM) the network drive does not exist. Mapped network drives are user context specific, does that make sense?

It's possible that it will work if you specify a network path instead of a drive, although this still may fail if the local SYSTEM user cannot access the remote share.