Skip to content

Not finding any quota for any user in Windows #1

Open
@MatiasLGonzalez

Description

@MatiasLGonzalez

I'm trying to set up the plugin for a Windows File Server, but I'm finding difficulties when testing, here's my check_quota-dirquota.log file:


This tool is deprecated and may be removed in future releases of Windows. Please use the Windows PowerShell cmdlets in the FileServerResourceManager module to administer File Server Resource Manager functionality.
Quotas on machine MY-MACHINE:

Quota Path:             D:\somestorage
Description:            None
Source Template:        100 MB Limit (Does not match template)
Quota Status:           Enabled
Limit:                  100,00 MB (Hard)
Used:                   1,00 KB (0%)
Available:              100,00 MB
Peak Usage:             1,00 KB (24/11/2023 11:06)
Thresholds:
   Warning ( 85%):      E-mail
   Warning ( 95%):      E-mail, Event Log
   Limit (100%):        E-mail, Event Log


And here's my settings:

# remember to add your own homepath to this list, if it is not the default!
# use 4 backslashes for one (ie. C:\Foobar\Baz becomes "C:\\\\Foobar\\\\Baz")
# keep the regexp similar to the existing ones: the first match without the trailing \ is the path, the second match the username
# the first template entry is the one where the path is not being added to the label, the others will end up in a format akin to: username-C_Users et al
#
our @win_userhomepath_templates = ( "(D:\\\\somestorage)\\\\([^\\\\]*)" );

# there is rarely a need to use the following:
our @win_grouphomepath_templates = ( "(D:)\\\\(.*)" );


# our inline-replacement for utils.pm:
our %ERRORS = ('UNKNOWN' ,-1,
       'OK'      , 0,
       'WARNING' , 1,
       'CRITICAL', 2
      );

Here's my output:

PS C:\Users\user\Downloads\check_quota_0.28> perl.exe -- .\check_quota.pl -W "C:\temp\check_quota-dirquota.log" -g "all" -l 5
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = (unset),
        (possibly more locale environment variables)
        LANG = "es_ES.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the system default locale ("Spanish_Paraguay.1252").
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_u '' => username ''
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_g 'all' => groupname 'all'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_m '' => mountpoint 'all'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_W 'C:\temp\check_quota-dirquota.log' => report_fpath 'C:\temp\check_quota-dirquota.log'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_p '' => addperfdata '0'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_P '' => shortperfdata '0'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_s '' => showonlynotok '0'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_n '' => exitcodealwaysok '0'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_x '' => excluderegexp ''
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_Q '' => shownoquotaalso '0'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_f '' => logfile '.\check_quota.log'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_l '5' => loglvl_screen '5'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Arg opt_L '' => loglvl_file '0'
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP>
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found other header stuff:
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> This tool is deprecated and may be removed in future releases of Windows. Please use the Windows PowerShell cmdlets in the FileServerResourceManager module to administer File Server Resource Manager functionality.
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found other header stuff: This tool is deprecated and may be removed in future releases of Windows. Please use the Windows PowerShell cmdlets in the FileServerResourceManager module to administer File Server Resource Manager functionality.
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Quotas on machine MY-MACHINE:
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found end of header / page begin: Quotas on machine MY-MACHINE:
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP>
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found block end.
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Quota Path:             D:\somestorage
2023-11-24 14:44:50 .\check_quota.pl[29916]: fpath 'D:\somestorage' => name '', dir ''
2023-11-24 14:44:50 .\check_quota.pl[29916]: fpath 'D:\somestorage' => name '', dir ''
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found new quotapath  (userquota? no, groupquota? no, fpath: D:\somestorage)
2023-11-24 14:44:50 .\check_quota.pl[29916]: quotapath  has name-perfdata D_somestorage
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Description:            None
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found unused data: Description:            None
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Source Template:        100 MB Limit (Does not match template)
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found unused data: Source Template:        100 MB Limit (Does not match template)
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Quota Status:           Enabled
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found unused data: Quota Status:           Enabled
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Limit:                  100,00 MB (Hard)
2023-11-24 14:44:50 .\check_quota.pl[29916]: Converted unitsval '100,00 MB' to bytes '104857600'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found quota limit for : 100,00 MB => 104857600 bytes
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Used:                   1,00 KB (0%)
2023-11-24 14:44:50 .\check_quota.pl[29916]: Converted unitsval '1,00 KB' to bytes '1024'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found quota used: 1,00 KB => 1024 bytes
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Available:              100,00 MB
2023-11-24 14:44:50 .\check_quota.pl[29916]: Converted unitsval '100,00 MB' to bytes '104857600'
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found quota available: 100,00 MB => 104857600 bytes
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Peak Usage:             1,00 KB (24/11/2023 11:06)
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found unused data: Peak Usage:             1,00 KB (24/11/2023 11:06)
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP> Thresholds:
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found unused data: Thresholds:
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP>    Warning ( 85%):      E-mail
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found unused data:    Warning ( 85%):      E-mail
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP>    Warning ( 95%):      E-mail, Event Log
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found unused data:    Warning ( 95%):      E-mail, Event Log
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP>    Limit (100%):        E-mail, Event Log
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found unused data:    Limit (100%):        E-mail, Event Log
2023-11-24 14:44:50 .\check_quota.pl[29916]: REP>
2023-11-24 14:44:50 .\check_quota.pl[29916]: Found block end.
2023-11-24 14:44:50 .\check_quota.pl[29916]: %repinfos after import is: $VAR1 = '';
$VAR2 = {
          'status' => 'OK',
          'name' => '',
          'softlimit' => 0,
          'grace' => 0,
          'fpath' => 'D:\\somestorage',
          'isgroupquota' => 0,
          'inuse' => 1024,
          'name-perfdata' => 'D_somestorage',
          'free' => 104857600,
          'hardlimit' => 104857600,
          'isuserquota' => 0
        };
2023-11-24 14:44:50 .\check_quota.pl[29916]: Looking at :
$VAR1 = {
          'status' => 'OK',
          'name' => '',
          'softlimit' => 0,
          'grace' => 0,
          'fpath' => 'D:\\somestorage',
          'isgroupquota' => 0,
          'inuse' => 1024,
          'name-perfdata' => 'D_somestorage',
          'free' => 104857600,
          'hardlimit' => 104857600,
          'isuserquota' => 0
        };
2023-11-24 14:44:50 .\check_quota.pl[29916]: There are 0 of 0 entries over quota.
2023-11-24 14:44:50 .\check_quota.pl[29916]: statusline has 49b length, txtoutput 0b.
UNKNOWN - No quota for any group could be found?!
PS C:\Users\user\Downloads\check_quota_0.28> perl.exe -- .\check_quota.pl -W "C:\temp\check_quota-dirquota.log" -u "all" -l 5
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LC_ALL = (unset),
        (possibly more locale environment variables)
        LANG = "es_ES.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the system default locale ("Spanish_Paraguay.1252").
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_u 'all' => username 'all'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_g '' => groupname ''
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_m '' => mountpoint 'all'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_W 'C:\temp\check_quota-dirquota.log' => report_fpath 'C:\temp\check_quota-dirquota.log'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_p '' => addperfdata '0'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_P '' => shortperfdata '0'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_s '' => showonlynotok '0'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_n '' => exitcodealwaysok '0'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_x '' => excluderegexp ''
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_Q '' => shownoquotaalso '0'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_f '' => logfile '.\check_quota.log'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_l '5' => loglvl_screen '5'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Arg opt_L '' => loglvl_file '0'
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP>
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found other header stuff:
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> This tool is deprecated and may be removed in future releases of Windows. Please use the Windows PowerShell cmdlets in the FileServerResourceManager module to administer File Server Resource Manager functionality.
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found other header stuff: This tool is deprecated and may be removed in future releases of Windows. Please use the Windows PowerShell cmdlets in the FileServerResourceManager module to administer File Server Resource Manager functionality.
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Quotas on machine MY-MACHINE:
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found end of header / page begin: Quotas on machine MY-MACHINE:
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP>
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found block end.
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Quota Path:             D:\somestorage
2023-11-24 14:46:37 .\check_quota.pl[31404]: fpath 'D:\somestorage' => name '', dir ''
2023-11-24 14:46:37 .\check_quota.pl[31404]: fpath 'D:\somestorage' => name '', dir ''
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found new quotapath  (userquota? no, groupquota? no, fpath: D:\somestorage)
2023-11-24 14:46:37 .\check_quota.pl[31404]: quotapath  has name-perfdata D_somestorage
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Description:            None
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found unused data: Description:            None
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Source Template:        100 MB Limit (Does not match template)
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found unused data: Source Template:        100 MB Limit (Does not match template)
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Quota Status:           Enabled
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found unused data: Quota Status:           Enabled
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Limit:                  100,00 MB (Hard)
2023-11-24 14:46:37 .\check_quota.pl[31404]: Converted unitsval '100,00 MB' to bytes '104857600'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found quota limit for : 100,00 MB => 104857600 bytes
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Used:                   1,00 KB (0%)
2023-11-24 14:46:37 .\check_quota.pl[31404]: Converted unitsval '1,00 KB' to bytes '1024'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found quota used: 1,00 KB => 1024 bytes
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Available:              100,00 MB
2023-11-24 14:46:37 .\check_quota.pl[31404]: Converted unitsval '100,00 MB' to bytes '104857600'
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found quota available: 100,00 MB => 104857600 bytes
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Peak Usage:             1,00 KB (24/11/2023 11:06)
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found unused data: Peak Usage:             1,00 KB (24/11/2023 11:06)
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP> Thresholds:
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found unused data: Thresholds:
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP>    Warning ( 85%):      E-mail
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found unused data:    Warning ( 85%):      E-mail
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP>    Warning ( 95%):      E-mail, Event Log
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found unused data:    Warning ( 95%):      E-mail, Event Log
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP>    Limit (100%):        E-mail, Event Log
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found unused data:    Limit (100%):        E-mail, Event Log
2023-11-24 14:46:37 .\check_quota.pl[31404]: REP>
2023-11-24 14:46:37 .\check_quota.pl[31404]: Found block end.
2023-11-24 14:46:37 .\check_quota.pl[31404]: %repinfos after import is: $VAR1 = '';
$VAR2 = {
          'isgroupquota' => 0,
          'grace' => 0,
          'isuserquota' => 0,
          'status' => 'OK',
          'name-perfdata' => 'D_somestorage',
          'inuse' => 1024,
          'hardlimit' => 104857600,
          'name' => '',
          'fpath' => 'D:\\somestorage',
          'free' => 104857600,
          'softlimit' => 0
        };
2023-11-24 14:46:37 .\check_quota.pl[31404]: Looking at :
$VAR1 = {
          'isgroupquota' => 0,
          'grace' => 0,
          'isuserquota' => 0,
          'status' => 'OK',
          'name-perfdata' => 'D_somestorage',
          'inuse' => 1024,
          'hardlimit' => 104857600,
          'name' => '',
          'fpath' => 'D:\\somestorage',
          'free' => 104857600,
          'softlimit' => 0
        };
2023-11-24 14:46:37 .\check_quota.pl[31404]: There are 0 of 0 entries over quota.
2023-11-24 14:46:37 .\check_quota.pl[31404]: statusline has 48b length, txtoutput 0b.
UNKNOWN - No quota for any user could be found?!

Any help would be appreciated!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions