#!/usr/bin/perl -w
+# Program for updating an rrd with info from innduct and inn logs
+# Needs to be run once inside a lock
+
+# rrd-graphs/newstailer - part of rrd-graphs, a tool for online graphs
+# Copyright 2010, 2012 Ian Jackson
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# killall newstailer
+# with-lock-ex -f data/news/lock sh -xc \
+# "rm data/news/*.rrd; ./newstailer -Odata/news/ -D \
+# /var/log/news/news.notice.{6,5,4,3,2,1}.gz /var/log/news/news.notice{.0,} ''"
+
use strict qw(refs vars);
use POSIX;
Step => 60,
DstArguments => "7200:0:U",
Xff => 0.5,
- Archives => [ [ 3600*4, 60 ], # 4hr, 1min resolution
- [ 3600*25, 180 ], # 25h, 3min resolution
- [ 86400*14*5, 3600 ], # 14wks, 1hr resolution
- [ 86400*370*2, 3600*24 ] ], # 2yr+, 1day resolution
+ Archives => [ [ 3600*4, 60 ], # 4hr, 1min resolution
+ [ 3600*25, 180 ], # 25h, 3min resolution
+ [ 86400*8, 600 ], # 8d, 10min resolution
+ [ 86400*7*14, 3600*2 ], # 14wks, 2hr resolution
+ [ 86400*366, 3600*6 ], # 1yr, 6hr resolution
+ [ 86400*366*3, 3600*24 ] ], # 3yr, 1d resolution
);
our @fields_in= qw(seconds accepted refused rejected duplicate