]> git.itanic.dy.fi Git - rrdd/commit
rrdtool: Add support for multi parsers
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sun, 11 Oct 2020 09:40:18 +0000 (12:40 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sun, 11 Oct 2020 09:40:18 +0000 (12:40 +0300)
commit7424327891ddb402b80142c83bfe1fe4303a35af
tree77f3d851d4c9f386afb66293a940615fc7184956
parente5f40aa3ece3ee1100b4c72455d73106091d4407
rrdtool: Add support for multi parsers

This new multi parser type can provide multiple data entries, each
having their own timestamp. The parsing interface is simply extended
so that the new parser returns an array of data elementrs, all in
rrdtool data format. The data is then fed directly to rrdtool via
"rrdtool update" command. New parser also is given the timestamp of
the last update.

As data timestamp is now provided by the parser, there are quite
significant implications on the timeout handling. Previously the
expectation was that each rrd database is updated only once during its
update interval and data fetching happens only once during an update
interval.

This expectation is no longer valid as the parser can return bunch of
data, which is all in past. And the parser would be happy to give even
more data if it was give a chance to do so. Therefore, the actual
"last_update" timestamp is now taken from the latest data entry. And
after each complete update, the job scheduler is notified to do a
re-schedule in order to start a new round of data acquicition in case
there is more data to parse.

The scheduler now needs to be able to wait indefinitely in case all
parsers are still active and there is no information about when a next
event is going to happen. Also a new backoff timestamp is introduced
to prevent the parser from continuously re-staring parsing in case the
data source fails to provide any new data at all.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
main.c
parser.h
rrdtool.c
rrdtool.h
utils.h