summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 92ead44)
raw | patch | inline | side by side (parent: 92ead44)
author | Pavel Piatruk <piatruk.p@gmail.com> | |
Fri, 22 Jan 2010 08:13:29 +0000 (09:13 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Fri, 22 Jan 2010 08:13:29 +0000 (09:13 +0100) |
It is useful when you don't want to see many graphs. How to use the patch:
apply it to collection.cgi and add lines with keyword ,,dontshowtype'' to
/etc/collectd/collection.conf:
dontshowtype: "if_errors"
dontshowtype: "if_packets"
Then you will see only if_octets types in "interface" plugin page.
Via Debian bug #566199.
apply it to collection.cgi and add lines with keyword ,,dontshowtype'' to
/etc/collectd/collection.conf:
dontshowtype: "if_errors"
dontshowtype: "if_packets"
Then you will see only if_octets types in "interface" plugin page.
Via Debian bug #566199.
contrib/collection.cgi | patch | blob | history |
diff --git a/contrib/collection.cgi b/contrib/collection.cgi
index cbdb76e846df35eed803e7de3940c03d00b98bdd..100c0c73b2a469d37081b64200bd3e3375ba43e2 100755 (executable)
--- a/contrib/collection.cgi
+++ b/contrib/collection.cgi
our $Config = "/etc/collection.conf";
our @DataDirs = ();
+our @DontShowTypes = ();
our $LibDir;
our $ValidTimespan =
$value =~ s#/*$##;
$LibDir = $value;
}
+ elsif ($key eq 'dontshowtype')
+ {
+ push (@DontShowTypes, $value);
+ }
else
{
print STDERR "Unknown key: $key\n";
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));
}