mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
parent
23d890cd59
commit
c4c73eae4c
1 changed files with 6 additions and 0 deletions
|
@ -160,6 +160,9 @@ sub do_collect {
|
||||||
|
|
||||||
foreach my $line (split(/\n/, `$fsget` )) {
|
foreach my $line (split(/\n/, `$fsget` )) {
|
||||||
my ($name, $key, $value, undef ) = (split(/\t/,$line));
|
my ($name, $key, $value, undef ) = (split(/\t/,$line));
|
||||||
|
# try to preserve underscores:
|
||||||
|
# * duplicate existing ones
|
||||||
|
# * afterwards replace slashs with single ones
|
||||||
($name =~ s/_/__/g);
|
($name =~ s/_/__/g);
|
||||||
($name =~ s/\//_/g);
|
($name =~ s/\//_/g);
|
||||||
$filesystems->{$name}->{$key}=$value;
|
$filesystems->{$name}->{$key}=$value;
|
||||||
|
@ -170,6 +173,9 @@ sub do_collect {
|
||||||
sub do_config_fs {
|
sub do_config_fs {
|
||||||
my ($fs) = @_;
|
my ($fs) = @_;
|
||||||
my $fs_slash = ($fs);
|
my $fs_slash = ($fs);
|
||||||
|
# try to restore underscores (see "do_collect" for the reverse operation):
|
||||||
|
# * substitute all underscores with slashs
|
||||||
|
# * afterwards transform *double* slashs back into a single underscore
|
||||||
($fs_slash =~ s/_/\//g);
|
($fs_slash =~ s/_/\//g);
|
||||||
($fs_slash =~ s/\/\//_/g);
|
($fs_slash =~ s/\/\//_/g);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue