1RRDUPDATE(1) rrdtool RRDUPDATE(1)
2
3
4
6 rrdupdate - Store a new set of values into the RRD
7
9 rrdtool {update | updatev} filename [--template|-t ds-name[:ds-
10 name]...] [--skip-past-updates|-s] [--daemon|-d address] [--]
11 N:value[:value]... timestamp:value[:value]... at-
12 timestamp@value[:value]...
13
15 The update function feeds new data values into an RRD. The data is time
16 aligned (interpolated) according to the properties of the RRD to which
17 the data is written.
18
19 updatev This alternate version of update takes the same arguments and
20 performs the same function. The v stands for verbose, which
21 describes the output returned. updatev returns a list of any
22 and all consolidated data points (CDPs) written to disk as a
23 result of the invocation of update. The values are indexed by
24 timestamp (time_t), RRA (consolidation function and PDPs per
25 CDP), and data source (name). Note that depending on the
26 arguments of the current and previous call to update, the list
27 may have no entries or a large number of entries.
28
29 Since updatev requires direct disk access, the --daemon option
30 cannot be used with this command.
31
32 filename
33 The name of the RRD you want to update.
34
35 --template|-t ds-name[:ds-name]...
36 By default, the update function expects its data input in the
37 order the data sources are defined in the RRD, excluding any
38 COMPUTE data sources (i.e. if the third data source DST is
39 COMPUTE, the third input value will be mapped to the fourth
40 data source in the RRD and so on). This is not very error
41 resistant, as you might be sending the wrong data into an RRD.
42
43 The template switch allows you to specify which data sources
44 you are going to update and in which order. If the data sources
45 specified in the template are not available in the RRD file,
46 the update process will abort with an error message.
47
48 While it appears possible with the template switch to update
49 data sources asynchronously, RRDtool implicitly assigns non-
50 COMPUTE data sources missing from the template the *UNKNOWN*
51 value.
52
53 Do not specify a value for a COMPUTE DST in the update
54 function. If this is done accidentally (and this can only be
55 done using the template switch), RRDtool will ignore the value
56 specified for the COMPUTE DST.
57
58 The caching daemon rrdcached cannot be used together with
59 templates yet.
60
61 --skip-past-updates|-s
62 When updating an rrd file with data earlier than the latest
63 update already applied, rrdtool will issue an error message and
64 abort. This option instructs rrdtool to silently skip such
65 data. It can be useful when re-playing old data into an rrd
66 file and you are not sure how many updates have already been
67 applied.
68
69 --daemon|-d address
70 If given, RRDtool will try to connect to the caching daemon
71 rrdcached at address. If the connection is successfully
72 established the values will be sent to the daemon instead of
73 accessing the files directly. If the connection cannot be
74 established it will fall back to direct file-access. While
75 this is convenient, it can silently create problems so please
76 read the warning in the examples.
77
78 For a list of accepted formats, see the -l option in the
79 rrdcached manual.
80
81 {N | timestamp}:value[:value]...
82 The data used for updating the RRD was acquired at a certain
83 time. This time can either be defined in seconds since
84 1970-01-01 or by using the letter 'N', in which case the update
85 time is set to be the current time. Negative time values are
86 subtracted from the current time. An AT_STYLE TIME
87 SPECIFICATION (see the rrdfetch documentation) may also be used
88 by delimiting the end of the time specification with the '@'
89 character instead of a ':'. Getting the timing right to the
90 second is especially important when you are working with data-
91 sources of type COUNTER, DERIVE, DCOUNTER, DDERIVE or ABSOLUTE.
92
93 When using negative time values, options and data have to be
94 separated by two dashes (--), else the time value would be
95 parsed as an option. See below for an example.
96
97 The remaining elements of the argument are DS updates. The
98 order of this list is the same as the order the data sources
99 were defined in the RRA. If there is no data for a certain
100 data-source, the letter U (e.g., N:0.1:U:1) can be specified.
101
102 The format of the value acquired from the data source is
103 dependent on the data source type chosen. Normally it will be
104 numeric, but the data acquisition modules may impose their very
105 own parsing of this parameter as long as the colon (:) remains
106 the data source value separator.
107
109 The following environment variables may be used to change the behavior
110 of "rrdtool update":
111
112 RRDCACHED_ADDRESS
113 If this environment variable is set it will have the same effect as
114 specifying the "--daemon" option on the command line. If both are
115 present, the command line argument takes precedence.
116
117 RRDCACHED_STRIPPATH
118 If this environment variable is set it will strip the leading
119 string from the filename prior to sending the filename to
120 rrdcached. This is mostly intended to allow rrdcached to work with
121 xymon and cacti tools without having to modify those tools.
122
124 · "rrdtool update demo1.rrd N:3.44:3.15:U:23"
125
126 Update the database file demo1.rrd with 3 known and one *UNKNOWN*
127 value. Use the current time as the update time.
128
129 · "rrdtool update demo2.rrd 887457267:U 887457521:22 887457903:2.7"
130
131 Update the database file demo2.rrd which expects data from a single
132 data-source, three times. First with an *UNKNOWN* value then with
133 two regular readings. The update interval seems to be around 300
134 seconds.
135
136 · "rrdtool update demo3.rrd -- -5:21 N:42"
137
138 Update the database file demo3.rrd two times, using five seconds in
139 the past and the current time as the update times.
140
141 · "rrdtool update --daemon unix:/tmp/rrdd.sock demo4.rrd N:23"
142
143 Use the UNIX domain socket "/tmp/rrdd.sock" to contact the caching
144 daemon. If the caching daemon is not available, update the file
145 "demo4.rrd" directly. WARNING: Since a relative path is specified,
146 the following disturbing effect may occur: If the daemon is
147 available, the file relative to the working directory of the daemon
148 is used. If the daemon is not available, the file relative to the
149 current working directory of the invoking process is used. This
150 may update two different files depending on whether the daemon
151 could be reached or not. Don't do relative paths, kids!
152
154 Tobias Oetiker <tobi@oetiker.ch>, Florian Forster
155 <octo at verplant.org>
156
157
158
1591.7.1 2019-02-04 RRDUPDATE(1)