File System

check_quota.pl

Description:

This scripts allows you to check the quota for a specific user, a specific group or all quota users (based on the repquota output), or the dirquota output for directories in Windows systems.

Provides perfdata if requested.

Current Version

0.29

Last Release Date

2018-02-03

Compatible With

  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI

License

Apache


Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Project Photos
Project Notes
== /etc/sudoers requirements == Needs an entry along the line of the following for repquota: nrpe localservername=NOPASSWD: /usr/sbin/repquota * If not unset yet, remember to add the following as well: Defaults:nrpe !requiretty # ./check_quota.pl -u all -m /my/quotamnt WARNING - login user1: 7.69T / 7.64T (Grace: 6 days 22 hours) # ./check_quota.pl -u all -m /my/quotamnt -Q WARNING - 1 of 10 users is overquota. OK - uid 111: 8.62G OK - uid 112: 138.00G WARNING - login user1: 7.69T / 7.64T (Grace: 6 days 22 hours) OK - login icinga: 769.00M OK - login user2: 96.39G OK - login user3: 112.00K OK - login user4: 53.79G OK - login user5: 307.00M OK - login user6: 1.44G OK - login user7: 934.00G # ./check_quota.pl -u all -m /my/quotamnt -Q -s WARNING - 1 of 10 users is overquota. WARNING - login user1: 7.69T / 7.64T (Grace: 6 days 22 hours) # ./check_quota.pl -u all -m /my/quotamnt -Q -s -p WARNING - 1 of 10 users is overquota. | user_111=9258926080;;;0; user_112=148176371712;;;0; user_user1=8898802537322;8398808547328;;0; user_icinga=806354944;;;0; user_user2=103497596928;;;0; user_user3=114688;;;0; user_user4=57751371776;;;0; user_user5=321912832;;;0; user_user6=1549795328;;;0; user_user7=1002874863616;;;0; WARNING - login user1: 7.69T / 7.64T (Grace: 6 days 22 hours) # ./check_quota.pl -u user1 -m /my/quotamnt -Q -s -p WARNING - login user1: 7.69T / 7.64T (Grace: 6 days 22 hours) | user_user1=8898802537322;8398808547328;;0; The script returns OK / WARNING / CRITICAL errorcode according to what repquota (yes, it's Linux-only) returns (including gracetime, if active, excluding -for now- inode limits). These are obviously based on what you defined for the user/group via edquota: If quota status is --, it returns OK. If quota status is -+ or +-, it returns WARNING. If quota status is ++, it returns CRITICAL. check_quota v0.29 is licensed under the Apache License, Version 2.0 . There is no warranty of any kind, explicit or implied, for anything this software does or does not do. The main page for this plugin can be found at: http://dev.techno.holics.at/check_quota/ (c) 2014,2017 by Frederic Krueger / fkrueger-dev-checkquota@holics.at
Reviews (1) Add a Review
almost perfect...
by Viperdriver2000, April 30, 2014
plugin works fine.
for me missing the option for warning and critical :(
Owner's Reply:

Since the plugin is little more than a glorified repquota wrapper (ie. it works only on Linux as of now), it uses the repquota internals and returns the errorcode fitting the condition, that is returned by repquota.

To quote from the script:
$quota_status = "OK" if ($quota_status eq "--");
$quota_status = "WARNING" if ($quota_status eq "-+");
$quota_status = "WARNING" if ($quota_status eq "+-");
$quota_status = "CRITICAL" if ($quota_status eq "++");


1 of 1 found this review helpful.
Helpful? Yes 1 No 0
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.7 (3)
Favorites
1
Views
97,882