RRDUPDATE(1) | rrdtool | RRDUPDATE(1) |
rrdupdate - Store a new set of values into the RRD
rrdtool {update | updatev} filename [--template|-t ds-name[:ds-name]...] [--skip-past-updates|-s] [--daemon|-d address] [--] N:value[:value]... timestamp:value[:value]... at-timestamp@value[:value]...
The update function feeds new data values into an RRD. The data is time aligned (interpolated) according to the properties of the RRD to which the data is written.
Since updatev requires direct disk access, the --daemon option cannot be used with this command.
The template switch allows you to specify which data sources you are going to update and in which order. If the data sources specified in the template are not available in the RRD file, the update process will abort with an error message.
While it appears possible with the template switch to update data sources asynchronously, RRDtool implicitly assigns non-COMPUTE data sources missing from the template the *UNKNOWN* value.
Do not specify a value for a COMPUTE DST in the update function. If this is done accidentally (and this can only be done using the template switch), RRDtool will ignore the value specified for the COMPUTE DST.
The caching daemon rrdcached cannot be used together with templates yet.
For a list of accepted formats, see the -l option in the rrdcached manual.
When using negative time values, options and data have to be separated by two dashes (--), else the time value would be parsed as an option. See below for an example.
The remaining elements of the argument are DS updates. The order of this list is the same as the order the data sources were defined in the RRA. If there is no data for a certain data-source, the letter U (e.g., N:0.1:U:1) can be specified.
The format of the value acquired from the data source is dependent on the data source type chosen. Normally it will be numeric, but the data acquisition modules may impose their very own parsing of this parameter as long as the colon (:) remains the data source value separator.
The following environment variables may be used to change the behavior of "rrdtool update":
Update the database file demo1.rrd with 3 known and one *UNKNOWN* value. Use the current time as the update time.
Update the database file demo2.rrd which expects data from a single data-source, three times. First with an *UNKNOWN* value then with two regular readings. The update interval seems to be around 300 seconds.
Update the database file demo3.rrd two times, using five seconds in the past and the current time as the update times.
Use the UNIX domain socket "/tmp/rrdd.sock" to contact the caching daemon. If the caching daemon is not available, update the file "demo4.rrd" directly. WARNING: Since a relative path is specified, the following disturbing effect may occur: If the daemon is available, the file relative to the working directory of the daemon is used. If the daemon is not available, the file relative to the current working directory of the invoking process is used. This may update two different files depending on whether the daemon could be reached or not. Don't do relative paths, kids!
Tobias Oetiker <tobi@oetiker.ch>, Florian Forster <octo at verplant.org>
2023-01-31 | 1.7.2 |