NSClient++ Help (#1) - Cannot Get Results for Mounted Drives Using CheckDriveSize (#844) - Message List

Cannot Get Results for Mounted Drives Using CheckDriveSize

Hi,

We have a huge need to check disk space on mapped drives (example: z:) and / or unc paths (
hostname\c:\foo) and I have tried the examples for the CheckDriveSize plugin with no success.

I've upraded NSCP to 0.3.9 (from 0.3.7) and cannot get CheckDriveSize to provide results for a mounted windows drive - it returns good results for hard-drives (ex: c:).

I am running NSCP on Win2k3 server. Initiating the checks via GroundWork? 6.4 and nrpe.

Following is a pretty straight forward example that fails: check_nrpe -H 172.16.23.224 -p 5666 -c CheckDriveSize -a Drive=z:\ FilterType?=REMOTE ShowAll MaxWarnUsed?=90% MaxCritUsed?=90

CRITICAL: Could not get free space for: z: FilterType?=REMOTE z: FilterType?=REMOTE reason: 3: The system cannot find the path specified. Command returned exit status 0

Here is the output from teh NSClient.log: 2011-08-17 17:03:06: debug:NSClient++.cpp:1144: Injecting: CheckDriveSize: Drive=z: FilterType?=REMOTE, ShowAll, MaxWarnUsed?=90%, MaxCritUsed?=90

2011-08-17 17:03:06: debug:NSClient++.cpp:1180: Injected Result: CRITICAL 'CRITICAL: Could not get free space for: z: FilterType?=REMOTE z: FilterType?=REMOTE reason: 3: The system cannot find the path specified. ' 2011-08-17 17:03:06: debug:NSClient++.cpp:1181: Injected Performance Result:

Please help!

  • Message #2280

    My guess is (just by reading the title so don't blame me to much for guessing wrong) that you map drives by letter. "Letters" live in a user session so the server (which runs in another session) will not have access to them.

    This can IIRC be solved in several ways the simplest of which is to check UNC paths like so
    foo.bar.com\drive instead of a:. There is also the issue of privlages as the service ´(normally) runs as a given user which might not be included in the ones which has access to the share in question.

    Michael Medin

    • Message #2293

      Hi Again,

      OK - I've played with your suggestions - but I am still unable to get proper results via either nrpe (active) or nsca (passive) checks. I Do get proper results when I run the following commmand from an "NSCLIENT++.exe /test" session BUT I CANNOT DETERMINE THE SYNTAX TO MAKE THIS WORK VIA NSC.INI for either active or passive checks.

      NOTE: Drive x: = \\radshare1\users
      *******************************************************
      HERE ARE MY CMD AND RESULTS FOR NSCLIENT++.EXE /TEST
      *******************************************************
      MAPPED DRIVE:
      CheckDriveSize Drive=x: FilterType=REMOTE
      d NSClient++.cpp(1073) Injecting: CheckDriveSize: Drive=x:, FilterType=REMOTE
      d \checkHelpers.hpp(758) Missing bounds for maxmin-bounds check: x:
      d NSClient++.cpp(1109) Injected Result: OK 'OK: All drives within bounds.'
      d NSClient++.cpp(1110) Injected Performance Result: ''x:'=11160403468288B;0;0; '
      OK:OK: All drives within bounds.|'x:'=11160403468288B;0;0;
      UNC:
      CheckDriveSize Drive=\\radshare1\users\ FilterType=REMOTE
      d NSClient++.cpp(1073) Injecting: CheckDriveSize: Drive=\\radshare1\users\, Filt
      erType=REMOTE
      d \checkHelpers.hpp(758) Missing bounds for maxmin-bounds check: \\radshare1\use
      rs\
      d NSClient++.cpp(1109) Injected Result: OK 'OK: All drives within bounds.'
      d NSClient++.cpp(1110) Injected Performance Result: ''\\radshare1\users\'=111604
      17599488B;0;0; '
      OK:OK: All drives within bounds.|'\\radshare1\users\'=11160417599488B;0;0;
      
      *******************************************************
      HERE IS WHAT I GET WHEN ATTEMPTING TO RUN THIS FROM NSC.INI as an ACTIVE (NRPE)or PASSIVE check (NSCA) WSith the NSCP Service running as the same user as when attepmpted via the NSCP TEST mode.
      *******************************************************
      (From nsc.ini)
      0_TEST_PSV-all-drives_freespace=CheckDriveSize -a Drive=x:\ FilterType=REMOTE MinWarn=10% MinCrit=5%
      (From nsclient.log)
      2011-08-29 15:39:32: debug:modules\NSCAAgent\NSCAThread.cpp:191: Executing (from NSCA): 0_TEST_PSV-all-drives_freespace
      2011-08-29 15:39:32: debug:NSClient++.cpp:1073: Injecting: CheckDriveSize: -a, Drive=x:\, FilterType=REMOTE, MinWarn=10%, MinCrit=5%
      2011-08-29 15:39:32: debug:NSClient++.cpp:1109: Injected Result: WARNING 'UNKNOWN: Drive does not match the current filter: -a (it is a no_root drive)'
      2011-08-29 15:39:32: debug:NSClient++.cpp:1110: Injected Performance Result: ''
      

Subscriptions