X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fcollection.cgi;h=100c0c73b2a469d37081b64200bd3e3375ba43e2;hb=3b4201d2235c25ed21174c41c526c9b7894de539;hp=eeda241df00c18682ccd27a41268c2178a003485;hpb=2239c03fe46755183c756e81ac19cd416a8f0184;p=collectd.git diff --git a/contrib/collection.cgi b/contrib/collection.cgi index eeda241d..100c0c73 100755 --- a/contrib/collection.cgi +++ b/contrib/collection.cgi @@ -13,6 +13,7 @@ use Data::Dumper (); our $Config = "/etc/collection.conf"; our @DataDirs = (); +our @DontShowTypes = (); our $LibDir; our $ValidTimespan = @@ -78,6 +79,10 @@ sub read_config $value =~ s#/*$##; $LibDir = $value; } + elsif ($key eq 'dontshowtype') + { + push (@DontShowTypes, $value); + } 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); + if (grep { $_ eq $type } @DontShowTypes) { next; } $types{$type} = [] if (!$types{$type}); push (@{$types{$type}}, $instance) if (defined ($instance)); } @@ -1290,9 +1296,9 @@ sub load_graph_definitions 'GPRINT:avg:LAST:%4.1lf Last\l' ], spam_check => [ - 'DEF:avg={file}:hits:AVERAGE', - 'DEF:min={file}:hits:MIN', - 'DEF:max={file}:hits:MAX', + 'DEF:avg={file}:value:AVERAGE', + 'DEF:min={file}:value:MIN', + 'DEF:max={file}:value:MAX', "AREA:max#$HalfMagenta", "AREA:min#$Canvas", "LINE1:avg#$FullMagenta:Count ",