X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=config%2Fcfgroot%2Fgraphs.pl;h=4783e67f7e60f0b20e0ce4c08d31a54dc0b57ae1;hb=8ffdc78c49e128755e0024dbb55a3f3d3796f7cd;hp=0e29e0e2d9567df1a0f97d1d3c1c1eca88732793;hpb=a232fe32bcc7f04951e37279d81b1e9ef01016c2;p=ipfire-2.x.git diff --git a/config/cfgroot/graphs.pl b/config/cfgroot/graphs.pl index 0e29e0e2d9..4783e67f7e 100644 --- a/config/cfgroot/graphs.pl +++ b/config/cfgroot/graphs.pl @@ -1160,3 +1160,31 @@ sub updateentropygraph { print "Error in RRD::graph for entropy: ".$ERROR."\n" if $ERROR; } + +sub updateconntrackgraph { + my $period = $_[0]; + my @command = ( + @GRAPH_ARGS, + "-", + "--start", + "-1" . $period, + "-r", + "--lower-limit","0", + "-t $Lang::tr{'connection tracking'}", + "-v $Lang::tr{'open connections'}", + "DEF:conntrack=$mainsettings{'RRDLOG'}/collectd/localhost/conntrack/conntrack.rrd:entropy:AVERAGE", + "LINE3:conntrack#ff0000:" . sprintf("%-15s", $Lang::tr{'open connections'}), + "VDEF:ctmin=conntrack,MINIMUM", + "VDEF:ctmax=conntrack,MAXIMUM", + "VDEF:ctavg=conntrack,AVERAGE", + "GPRINT:ctmax:" . sprintf("%15s\\: %%5.0lf", $Lang::tr{'maximum'}), + "GPRINT:ctmin:" . sprintf("%15s\\: %%5.0lf", $Lang::tr{'minimum'}), + "GPRINT:ctavg:" . sprintf("%15s\\: %%5.0lf", $Lang::tr{'average'}) . "\\n", + "--color=BACK" . $color{"color21"}, + ); + + RRDs::graph(@command); + $ERROR = RRDs::error; + + print STDERR "Error in RRD::Graph for conntrack: " . $ERROR . "\n" if $ERROR; +}