]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
graphs.pl: Fixes bug12981 - Creates in and outgoing drop hostile graph entries
authorAdolf Belka <adolf.belka@ipfire.org>
Sun, 21 Jan 2024 11:45:52 +0000 (12:45 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 7 Feb 2024 11:02:18 +0000 (11:02 +0000)
- This v3 version of the patch set splits the single hostile networks graph entry into
   incoming hostile networks and outgoing hostile networks entries.

Fixes: bug12981
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/cfgroot/graphs.pl

index 9803dd12418a8c60683ce42d146639813413560a..f527447b5310bf6d7309184dda46842b06e713d1 100644 (file)
@@ -693,7 +693,8 @@ sub updatefwhitsgraph {
                "DEF:newnotsyn=".$mainsettings{'RRDLOG'}."/collectd/localhost/iptables-filter-NEWNOTSYN/ipt_bytes-DROP_NEWNOTSYN.rrd:value:AVERAGE",
                "DEF:portscan=".$mainsettings{'RRDLOG'}."/collectd/localhost/iptables-filter-PSCAN/ipt_bytes-DROP_PScan.rrd:value:AVERAGE",
                "DEF:spoofedmartian=".$mainsettings{'RRDLOG'}."/collectd/localhost/iptables-filter-SPOOFED_MARTIAN/ipt_bytes-DROP_SPOOFED_MARTIAN.rrd:value:AVERAGE",
-               "DEF:hostile=".$mainsettings{'RRDLOG'}."/collectd/localhost/iptables-filter-HOSTILE_DROP/ipt_bytes-DROP_HOSTILE.rrd:value:AVERAGE",
+               "DEF:hostilein=".$mainsettings{'RRDLOG'}."/collectd/localhost/iptables-filter-HOSTILE_DROP_IN/ipt_bytes-DROP_HOSTILE.rrd:value:AVERAGE",
+               "DEF:hostileout=".$mainsettings{'RRDLOG'}."/collectd/localhost/iptables-filter-HOSTILE_DROP_OUT/ipt_bytes-DROP_HOSTILE.rrd:value:AVERAGE",
                "COMMENT:".sprintf("%-26s",$Lang::tr{'caption'}),
                "COMMENT:".sprintf("%15s",$Lang::tr{'maximal'}),
                "COMMENT:".sprintf("%15s",$Lang::tr{'average'}),
@@ -729,11 +730,16 @@ sub updatefwhitsgraph {
                "GPRINT:spoofedmartian:AVERAGE:%8.1lf %sBps",
                "GPRINT:spoofedmartian:MIN:%8.1lf %sBps",
                "GPRINT:spoofedmartian:LAST:%8.1lf %sBps\\j",
-               "STACK:hostile".$color{"color13"}."A0:".sprintf("%-25s",$Lang::tr{'hostile networks'}),
-               "GPRINT:hostile:MAX:%8.1lf %sBps",
-               "GPRINT:hostile:AVERAGE:%8.1lf %sBps",
-               "GPRINT:hostile:MIN:%8.1lf %sBps",
-               "GPRINT:hostile:LAST:%8.1lf %sBps\\j",
+               "STACK:hostilein".$color{"color13"}."A0:".sprintf("%-25s",$Lang::tr{'hostile networks in'}),
+               "GPRINT:hostilein:MAX:%8.1lf %sBps",
+               "GPRINT:hostilein:AVERAGE:%8.1lf %sBps",
+               "GPRINT:hostilein:MIN:%8.1lf %sBps",
+               "GPRINT:hostilein:LAST:%8.1lf %sBps\\j",
+               "STACK:hostileout".$color{"color25"}."A0:".sprintf("%-25s",$Lang::tr{'hostile networks out'}),
+               "GPRINT:hostileout:MAX:%8.1lf %sBps",
+               "GPRINT:hostileout:AVERAGE:%8.1lf %sBps",
+               "GPRINT:hostileout:MIN:%8.1lf %sBps",
+               "GPRINT:hostileout:LAST:%8.1lf %sBps\\j",
                );
                $ERROR = RRDs::error;
                return "Error in RRD::graph for firewallhits: ".$ERROR."\n" if $ERROR;