Révision cde12172
Clean fieldnames, to allow filesystems and pools containing "-" to be graphed.
| plugins/zfs/zfs_usage_ | ||
|---|---|---|
| 172 | 172 |
($fs_slash =~ s/_/\//g); |
| 173 | 173 |
|
| 174 | 174 |
if ( $fs ne $zpool ) {
|
| 175 |
print "multigraph zfs_usage_$zpool.$fs\n"; |
|
| 175 |
printf( "multigraph zfs_usage_%s.%s\n", |
|
| 176 |
clean_fieldname($zpool), clean_fieldname($fs) ); |
|
| 176 | 177 |
print "graph_title ZFS usage for $filesystems->{$fs}->{type} $fs_slash\n";
|
| 177 | 178 |
print "graph_info This graph shows used bytes of $filesystems->{$fs}->{type} $fs_slash\n";
|
| 178 | 179 |
} else {
|
| 179 |
print "multigraph zfs_usage_$zpool\n";
|
|
| 180 |
printf( "multigraph zfs_usage_%s\n", clean_fieldname($zpool) );
|
|
| 180 | 181 |
print "graph_title ZFS usage for zpool $zpool\n"; |
| 181 | 182 |
print "graph_info This graph shows used bytes of zpool $zpool\n"; |
| 182 | 183 |
} |
| ... | ... | |
| 212 | 213 |
my ($fs) = @_; |
| 213 | 214 |
|
| 214 | 215 |
if ( $fs ne $zpool ) {
|
| 215 |
print "multigraph zfs_usage_$zpool.$fs\n"; |
|
| 216 |
printf( "multigraph zfs_usage_%s.%s\n", |
|
| 217 |
clean_fieldname($zpool), clean_fieldname($fs) ); |
|
| 216 | 218 |
} else {
|
| 217 |
print "multigraph zfs_usage_$zpool\n";
|
|
| 219 |
printf( "multigraph zfs_usage_%s\n", clean_fieldname($zpool) );
|
|
| 218 | 220 |
} |
| 219 | 221 |
|
| 220 | 222 |
foreach my $key ( keys %{$filesystems->{$fs}}) {
|
Formats disponibles : Unified diff