RRDTool: グラフに累積値を表示する方法

RRDTool: グラフに累積値を表示する方法

IPTable からいくつかの値を使用して、rrdtool でグラフを作成したいと考えています。これらのイベントをキャッチして rrd データベースに保存するように collectd サービスを設定しました。

collectd 設定:

LoadPlugin tail <Plugin tail>
        <File "/var/log/iptables.log">
                Plugin "firewall"
                Instance "iptables"
                Interval 60
                <Match>
                        Regex "INPUT/DROP"
                        DSType "GaugeInc"
                        Type "gauge"
                        Instance "incoming-total"
                </Match>
                <Match>
                        Regex "DPT=22 "
                        DSType "GaugeInc"
                        Type "gauge"
                        Instance "incoming-port22"
                </Match>
                <Match>
                        Regex "DPT=80 "
                        DSType "GaugeInc"
                        Type "gauge"
                        Instance "incoming-port80"
                </Match>
                <Match>
                        Regex "DPT=443 "
                        DSType "GaugeInc"
                        Type "gauge"
                        Instance "incoming-port443"
                </Match>
                <Match>
                        Regex "DPT=8080 "
                        DSType "GaugeInc"
                        Type "gauge"
                        Instance "incoming-port8080"
                </Match>
        </File> </Plugin>

値は次のように保存されます。

1696950174.458,nan
1696950234.458,nan
1696950294.458,1.000000
1696950354.458,nan
1696950414.458,nan
1696950474.458,nan
1696950534.458,nan
1696950594.458,nan
1696950654.458,nan
1696950714.458,1.000000

値を示すグラフが欲しいです。

これが私の rrdgraph 構成の一部です。何が間違っているのか、どうすれば解決できるのか、ご存知ですか?

args.append('{image_dir}/firewall-{period}.png'.format(**config))
args.extend(config['defaults'])
args.extend(['--start', config['start']])
args.extend(['--title', '"{title_firewall}{title_by_period}"'.format(**config)])
args.append('--slope-mode')
args.extend(['--lower-limit', '0'])
args.extend(['--vertical-label', '"Dropped connections"'])

args.append('DEF:citavg="{data_dir}/firewall-iptables/gauge-incoming-total.rrd":value:AVERAGE'.format(**config))
args.append('DEF:citmax="{data_dir}/firewall-iptables/gauge-incoming-total.rrd":value:MAX'.format(**config))

args.append('LINE1:citavg{color_firewall_total}:"Total           "'.format(**config))
args.append('GPRINT:citavg:AVERAGE:"%5.1lf%s Avg"')
args.append('GPRINT:citmax:MAX:"%5.1lf%s Max"')

args.append('COMMENT:"{last_update}"'.format(**config))

ありがとう

関連情報