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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Txiki
Posts: 2
Joined: Wed Oct 07, 2015 4:55 am

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

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post by hsmith »

Can you post the command you are issuing to check? You may need to escape out some characters.
Former Nagios Employee.
me.
Txiki
Posts: 2
Joined: Wed Oct 07, 2015 4:55 am

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

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

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

Post 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.
Locked