How to update data using RRDtool?

I use RRDtool to store data to display graphs. I am updating RRD with RRDs :: update, and this fails when overwriting the information, it means updating data in the past time (for example, someone moved the system timer back). The error I am getting is:

ERROR: Cannot update /opt/dashboard/rrd/Disk/192.168.120.168_disk_1.rrd with 
'1228032301:24:24' illegal attempt to update using time 1228032301 when last 
update time is 1228050001 (minimum one second step)

I want to always allow rewriting, how can I do this?

+5
source share
3 answers

rrdtool rrd . , , . , " " rrdtool update , , "" .

, , rrdtool, - "" rrd xml, "" . , .

+3

script :

#!/bin/sh
rrdtool dump "$1" | perl -ne 'BEGIN {$t=`date +%s`; chomp($t);} $a=$_; if ($a =~ /lastupdate.\d+..lastupdate/) { $a =~ s/(lastupdate.)\d+(..lastupdate)/$1$t$2/; } print $a' | rrdtool restore -f - "$1"

... , .

+3

RRD . , , , , , "N". RRDtool .

, catch-and-retry, , "N" - .

RRDtool .

+1

All Articles