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.
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));
}