mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Whitespace cleanup
* remove trailing whitespace * remove empty lines at the end of files
This commit is contained in:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -28,18 +28,18 @@ You could define two alert levels, the graph language, min. human UID and dealin
|
|||
env.humanuid [value] (default: 1000, only need if there is an other value define for UID_MIN in /etc/login.defs)
|
||||
env.low_uid [never|no|yes] (default: never)
|
||||
set to no for producing rrd files for system user, but don't show those graphs (e.g. for later analyses)
|
||||
if set to yes system user graphs are drawn
|
||||
if set to yes system user graphs are drawn
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Wild card Plugin for monitoring the utilization of devices with quota rules.
|
||||
A graph is drawn for each user, which shows the usage as a percentage of his hard limit. System accounts (UID <1000) are suppressed.
|
||||
In addition, a graph is displayed which indicates the ratio device size to device coverage.
|
||||
The script repqutoa, usually part of the package quota, is needed.
|
||||
Wild card Plugin for monitoring the utilization of devices with quota rules.
|
||||
A graph is drawn for each user, which shows the usage as a percentage of his hard limit. System accounts (UID <1000) are suppressed.
|
||||
In addition, a graph is displayed which indicates the ratio device size to device coverage.
|
||||
The script repqutoa, usually part of the package quota, is needed.
|
||||
The plugin itself can be stored in any directory. For example, the device sdb1 shell be monitored, a symbolic link must be created
|
||||
in the /etc/munin/plugins/ directory as follows:
|
||||
in the /etc/munin/plugins/ directory as follows:
|
||||
|
||||
=over
|
||||
=over
|
||||
|
||||
I<<< ln -s /<path to file>/quota2percent_ quota2percent_sdb1 >>>
|
||||
|
||||
|
@ -72,7 +72,7 @@ V17.0214
|
|||
add example graph for Munin Plugin Gallery
|
||||
|
||||
remove setting a PATH
|
||||
remove German comments
|
||||
remove German comments
|
||||
|
||||
V17.0124
|
||||
|
||||
|
@ -83,7 +83,7 @@ V17.0124
|
|||
Jo Hartmann
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
|
||||
GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
|
||||
|
||||
=cut
|
||||
|
@ -142,7 +142,7 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
|
|||
###################################################
|
||||
|
||||
# Reading the quotes for the selected device, using repquota
|
||||
if repquota "/dev/$Id" &> /dev/null; then
|
||||
if repquota "/dev/$Id" &> /dev/null; then
|
||||
readarray Quotas < <( repquota "/dev/$Id" | grep " -- " )
|
||||
else
|
||||
echo "No limitations administered via 'quota' for $Id" >&2
|
||||
|
@ -151,13 +151,13 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
|
|||
# the avoidance of a divide-by-zero error
|
||||
Quotas[0]="root -- 1 1 1 1 1 1"
|
||||
|
||||
# no rrd file need
|
||||
# no rrd file need
|
||||
Low_UID="never"
|
||||
fi
|
||||
|
||||
readarray Totals < <( df "/dev/$Id" )
|
||||
|
||||
# Get the count of Users
|
||||
# Get the count of Users
|
||||
Users=${#Quotas[@]}
|
||||
|
||||
|
||||
|
@ -167,7 +167,7 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
|
|||
|
||||
if [ "$1" = "config" ]; then
|
||||
|
||||
# Localisation of the graphic texts
|
||||
# Localisation of the graphic texts
|
||||
case $Language in
|
||||
de)
|
||||
echo "graph_title Quota-Hard-Limit von $Id"
|
||||
|
@ -176,9 +176,9 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
|
|||
Total_txt="Su. aller Nutzer"
|
||||
Total_info="Inklusive Systemnutzer (UID < $Min_UID)"
|
||||
;;
|
||||
es)
|
||||
echo "graph_title Cuota de límite absoluto de $Id"
|
||||
echo "graph_vlabel el % de uso del límite duro"
|
||||
es)
|
||||
echo "graph_title Cuota de límite absoluto de $Id"
|
||||
echo "graph_vlabel el % de uso del límite duro"
|
||||
echo "graph_info El gráfico muestra la disponibilidad de espacio regulado por cuotas para todos los usuarios regulares (UID >= $Min_UID) como porcentaje de límites duros."
|
||||
Total_txt="Suma de todos los usuarios "
|
||||
Total_info="La inclusión de usuario del sistema (UID < $Min_UID) "
|
||||
|
@ -188,11 +188,11 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
|
|||
echo "graph_vlabel Usage in %"
|
||||
echo "graph_info The graphic shows the allocation of the quota-regulated storage space for all regular users (UID >= $Min_UID) as a percentage of the hard limit ."
|
||||
Total_txt="all users"
|
||||
Total_info="system users (UID < $Min_UID) included"
|
||||
Total_info="system users (UID < $Min_UID) included"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Defaults configuration
|
||||
# Defaults configuration
|
||||
echo "graph_category disk"
|
||||
echo "graph_args --lower-limit 0 --upper-limit 100"
|
||||
echo "graph_printf %5.2lf %%"
|
||||
|
@ -208,9 +208,9 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
|
|||
# Determine the currently processing UID
|
||||
Cur_UID="$(id -u "$User")"
|
||||
|
||||
# skip if actual user a system user und low_uid ist set to never
|
||||
# skip if actual user a system user und low_uid ist set to never
|
||||
[ "$Cur_UID" -lt "$Min_UID" ] && [ "$Low_UID" = "never" ] && continue
|
||||
|
||||
|
||||
# No graph for none human uid if low_uid ist set to no
|
||||
[ "$Cur_UID" -lt "$Min_UID" ] && echo "$Fieldname.graph $Low_UID"
|
||||
|
||||
|
@ -218,7 +218,7 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
|
|||
echo "$Fieldname.label $User"
|
||||
echo "$Fieldname.warning $Warning"
|
||||
echo "$Fieldname.critical $Critical"
|
||||
|
||||
|
||||
done
|
||||
|
||||
# configure the total line and send exit code NO ERROR happens
|
||||
|
@ -238,15 +238,15 @@ GPLv2 (L<http://www.gnu.org/licenses/gpl-2.0.html>)
|
|||
Quota=( ${Quotas[$i]} )
|
||||
Fieldname="$(clean_fieldname "${Quota[0]}")"
|
||||
|
||||
# skip if actual user a system user und low_uid ist set to never
|
||||
# skip if actual user a system user und low_uid ist set to never
|
||||
[ "$Cur_UID" -lt "$Min_UID" ] && [ "$Low_UID" = "never" ] && continue
|
||||
|
||||
# write the result zu munin
|
||||
# write the result zu munin
|
||||
echo "${Quota[2]} ${Quota[4]} $Fieldname.value" | awk '{printf "%s %f\n",$3,$1*100/$2}'
|
||||
|
||||
done
|
||||
|
||||
# the value for the total line
|
||||
# the value for the total line
|
||||
Total=( ${Totals[1]} )
|
||||
echo "${Total[2]} ${Total[1]} total.value" | awk '{printf "%s %f\n",$3,$1*100/$2}'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue