mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
dhcp-pool: field name may not start with number, prefix them with "_"
Also include pool range "from_ip - to_ip" to field label
This commit is contained in:
parent
341de2c2b9
commit
43f5d31c21
1 changed files with 4 additions and 4 deletions
|
@ -69,9 +69,9 @@ elsif ( defined $ARGV[0] and $ARGV[0] eq "config" ) {
|
|||
foreach $start (keys %pools) {
|
||||
$label = ip2string($start);
|
||||
$label =~ s/\./\_/g;
|
||||
print "$label.label Pool ".ip2string($start)."\n";
|
||||
print "$label.warning 75\n";
|
||||
print "$label.critical 100\n";
|
||||
print "_$label.label Pool " . ip2string($start) . " - " . ip2string($start + $pools{$start} - 1) . "\n";
|
||||
print "_$label.warning 75\n";
|
||||
print "_$label.critical 100\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -96,7 +96,7 @@ else {
|
|||
}
|
||||
$label = ip2string($start);
|
||||
$label =~ s/\./\_/g;
|
||||
print "$label.value ".sprintf("%.1f", 100*($size-$free)/$size)."\n";
|
||||
print "_$label.value ".sprintf("%.1f", 100*($size-$free)/$size)."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue