wieder rau

This commit is contained in:
Michael Grote 2021-09-22 17:51:20 +02:00
parent b6d9a87c91
commit 74e1a617fb

View file

@ -79,28 +79,6 @@ function get_mem_free {
echo $line | awk '/free-memory:/{ gsub(/MiB/,"",$2); print $2 }' | tr -dc '[0-9.]'
done <<< "$data")
}
function get_disk_total {
disk_total=$(
while read -r line; do
echo $line | grep KiB | awk '/total-hdd-space:/ {
gsub(/KiB/,"",$2)
print $2 }'
echo $line | grep MiB | awk '/total-hdd-space:/ {
gsub(/MiB/,"",$2)
print $2*1024}'
done <<< "$data")
}
function get_disk_free {
disk_free=$(
while read -r line; do
echo $line | grep KiB | awk '/free-hdd-space:/ {
gsub(/KiB/,"",$2)
print $2 }'
echo $line | grep MiB | awk '/free-hdd-space:/ {
gsub(/MiB/,"",$2)
print $2*1024}'
done <<< "$data")
}
function get_voltage_label {
while read -r line; do # für jede zeile in... ; siehe "done"
@ -351,13 +329,9 @@ function get_disk_label {
print "free_disk.label free disk space";
print "used_disk.label used disk";
print "graph_info Total, Used & free Disk space."}'
# warning + crit
done <<< "$data"
}
function get_disk_value {
get_disk_free
get_disk_total
if [ "$MUNIN_CAP_DIRTYCONFIG" = "0" ] || [ -z "$MUNIN_CAP_DIRTYCONFIG" ]; then
echo multigraph disk_$name
fi
@ -375,8 +349,6 @@ function get_disk_value {
gsub(/MiB/,"",$2)
print "total_disk.value " $2*1024 }'
done <<< "$data"
echo used_disk.value $(echo $disk_total-$disk_free| bc)
}