2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

canonicalize keys with _ instead of dots

This commit is contained in:
Rémi Paulmier 2014-02-07 15:45:04 +01:00
parent e3e3ca2787
commit 0ddf01817f

View File

@ -95,8 +95,10 @@ sub do_stats {
open(Q,"> $STATEFILE") or die;
foreach $k (@INkeys[0 .. 19]) {
print "rr_$k.value ",$IN{$k},"\n";
print Q "$k ",$IN{$k},"\n";
next if not defined $k;
my $l = $k; $k =~ tr/\./_/;
print "rr_$k.value ",$IN{$l},"\n";
print Q "$l ",$IN{$l},"\n";
}
close(Q);
}
@ -114,7 +116,9 @@ graph_vlabel Queries / \${graph_period}
my @INkeys = sort { $IN{$b} <=> $IN{$a} } keys %IN;
foreach $k (@INkeys[0 .. 19]) {
print "rr_$k.label $k
next if not defined $k;
my $l = $k; $k =~ tr/\./_/;
print "rr_$k.label $l
rr_$k.type DERIVE
rr_$k.min 0
rr_$k.draw STACK