projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
contrib/collection3: Add basic compatibility to mod_perl.
[collectd.git]
/
contrib
/
collection.cgi
diff --git
a/contrib/collection.cgi
b/contrib/collection.cgi
index
3cc24c3
..
af64fb1
100755
(executable)
--- a/
contrib/collection.cgi
+++ b/
contrib/collection.cgi
@@
-13,6
+13,7
@@
use Data::Dumper ();
our $Config = "/etc/collection.conf";
our @DataDirs = ();
our $Config = "/etc/collection.conf";
our @DataDirs = ();
+our @DontShowTypes = ();
our $LibDir;
our $ValidTimespan =
our $LibDir;
our $ValidTimespan =
@@
-78,6
+79,10
@@
sub read_config
$value =~ s#/*$##;
$LibDir = $value;
}
$value =~ s#/*$##;
$LibDir = $value;
}
+ elsif ($key eq 'dontshowtype')
+ {
+ push (@DontShowTypes, $value);
+ }
else
{
print STDERR "Unknown key: $key\n";
else
{
print STDERR "Unknown key: $key\n";
@@
-239,6
+244,7
@@
sub _find_types
my $name = "$_";
$name =~ s/\.rrd$//i;
my ($type, $instance) = split (m/-/, $name, 2);
my $name = "$_";
$name =~ s/\.rrd$//i;
my ($type, $instance) = split (m/-/, $name, 2);
+ if (grep { $_ eq $type } @DontShowTypes) { next; }
$types{$type} = [] if (!$types{$type});
push (@{$types{$type}}, $instance) if (defined ($instance));
}
$types{$type} = [] if (!$types{$type});
push (@{$types{$type}}, $instance) if (defined ($instance));
}