Révision 43f5d31c
dhcp-pool: field name may not start with number, prefix them with "_"
Also include pool range "from_ip - to_ip" to field label
| plugins/dhcp/dhcp-pool | ||
|---|---|---|
| 69 | 69 |
foreach $start (keys %pools) {
|
| 70 | 70 |
$label = ip2string($start); |
| 71 | 71 |
$label =~ s/\./\_/g; |
| 72 |
print "$label.label Pool ".ip2string($start)."\n";
|
|
| 73 |
print "$label.warning 75\n"; |
|
| 74 |
print "$label.critical 100\n"; |
|
| 72 |
print "_$label.label Pool " . ip2string($start) . " - " . ip2string($start + $pools{$start} - 1) . "\n";
|
|
| 73 |
print "_$label.warning 75\n";
|
|
| 74 |
print "_$label.critical 100\n";
|
|
| 75 | 75 |
} |
| 76 | 76 |
} |
| 77 | 77 |
else {
|
| ... | ... | |
| 96 | 96 |
} |
| 97 | 97 |
$label = ip2string($start); |
| 98 | 98 |
$label =~ s/\./\_/g; |
| 99 |
print "$label.value ".sprintf("%.1f", 100*($size-$free)/$size)."\n";
|
|
| 99 |
print "_$label.value ".sprintf("%.1f", 100*($size-$free)/$size)."\n";
|
|
| 100 | 100 |
} |
| 101 | 101 |
} |
| 102 | 102 |
|
Formats disponibles : Unified diff