From f777b737252c67b0c05eaa31ce098a87f51536c5 Mon Sep 17 00:00:00 2001 From: Sebastian Jennen Date: Mon, 14 Oct 2024 08:28:47 +0200 Subject: [PATCH] syslog_ng_stats: mark total counter stats as DERIVE / min 0 (#1459) * syslog_ng_stats: mark total counter stats as DERIVE / min 0 the data produced by the underlying `syslog-ng-ctl stats` gives the stats values in absolute numbers since the start of the syslog-ng daemon. In order to visualize in a more user friendly way those values are now marked in the config as type DERIVE. * syslog_ng_stats: graph_vlabel set as messages/graph_period --- plugins/syslog/syslog_ng_stats | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/syslog/syslog_ng_stats b/plugins/syslog/syslog_ng_stats index 8ec54d99..d68699e7 100755 --- a/plugins/syslog/syslog_ng_stats +++ b/plugins/syslog/syslog_ng_stats @@ -103,7 +103,7 @@ for my $graph (@str) { # Show config if( exists $ARGV[0] and $ARGV[0] eq "config" ) { print "graph_title Syslog-ng statistics\n"; - print "graph_vlabel count\n"; + print "graph_vlabel messages/\${graph_period}\n"; print "graph_args --base 1000 --lower-limit 0 --rigid\n"; print "graph_info This graph show syslog-ng-ctl stats\n"; print "graph_category system\n"; @@ -117,6 +117,7 @@ if( exists $ARGV[0] and $ARGV[0] eq "config" ) { printf "%s.label %s: %s, %s\n", $id, $graph->{source_name},$graph->{source_id}, $graph->{type}; printf "%s.min 0\n", $id; + printf "%s.type DERIVE\n", $id; } }