mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Clean fieldnames, to allow filesystems and pools containing "-" to be graphed.
This commit is contained in:
parent
fe35abf5c0
commit
cde121726f
1 changed files with 6 additions and 4 deletions
|
@ -172,11 +172,12 @@ sub do_config_fs {
|
||||||
($fs_slash =~ s/_/\//g);
|
($fs_slash =~ s/_/\//g);
|
||||||
|
|
||||||
if ( $fs ne $zpool ) {
|
if ( $fs ne $zpool ) {
|
||||||
print "multigraph zfs_usage_$zpool.$fs\n";
|
printf( "multigraph zfs_usage_%s.%s\n",
|
||||||
|
clean_fieldname($zpool), clean_fieldname($fs) );
|
||||||
print "graph_title ZFS usage for $filesystems->{$fs}->{type} $fs_slash\n";
|
print "graph_title ZFS usage for $filesystems->{$fs}->{type} $fs_slash\n";
|
||||||
print "graph_info This graph shows used bytes of $filesystems->{$fs}->{type} $fs_slash\n";
|
print "graph_info This graph shows used bytes of $filesystems->{$fs}->{type} $fs_slash\n";
|
||||||
} else {
|
} else {
|
||||||
print "multigraph zfs_usage_$zpool\n";
|
printf( "multigraph zfs_usage_%s\n", clean_fieldname($zpool) );
|
||||||
print "graph_title ZFS usage for zpool $zpool\n";
|
print "graph_title ZFS usage for zpool $zpool\n";
|
||||||
print "graph_info This graph shows used bytes of zpool $zpool\n";
|
print "graph_info This graph shows used bytes of zpool $zpool\n";
|
||||||
}
|
}
|
||||||
|
@ -212,9 +213,10 @@ sub do_fetch_fs {
|
||||||
my ($fs) = @_;
|
my ($fs) = @_;
|
||||||
|
|
||||||
if ( $fs ne $zpool ) {
|
if ( $fs ne $zpool ) {
|
||||||
print "multigraph zfs_usage_$zpool.$fs\n";
|
printf( "multigraph zfs_usage_%s.%s\n",
|
||||||
|
clean_fieldname($zpool), clean_fieldname($fs) );
|
||||||
} else {
|
} else {
|
||||||
print "multigraph zfs_usage_$zpool\n";
|
printf( "multigraph zfs_usage_%s\n", clean_fieldname($zpool) );
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $key ( keys %{$filesystems->{$fs}}) {
|
foreach my $key ( keys %{$filesystems->{$fs}}) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue