Ticket #253 (closed enhancement: patch does not fit)
Add rrd_lastupdate to all bindings (including PHP)
| Reported by: | human | Owned by: | oetiker |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | misc | Version: | |
| Keywords: | Cc: | jyavenard@… |
Description
From Jean-Yves Avenard: jyavenard@…
For some reasons, the rrd_lastupdate isn't available through the RRD programming bindings (except for the Tcl and Perl-piped which are simply calling the main rrdtool command line).
For some reasons, rrd_lastupdate API is set up very differently than all other APIs and isn't suitable for export (it simply does a printf of the values).
This patch adds a new rrd_lastupdate_s entry point, that behaves like the other entry points. A new name had to be used in order to keep backward compatibility. rrd_lastupdate returns the timestamp of the last entry, the list of DS names in the RRD file and the list of the last values entered. Note that the list of last values is made of strings and not long/integer as this is what's returned by the internal call rrd_lastupdate_r
Also attached are the updated bindings for: -Python -Ruby -Perl-shared -Lua
Perl and Lua updates weren't tested, but I'm fairly confident it's fine. (after updating all the other bindings, I got the hang of it :) )
Also attached is the update RRDTool-PHP module (both complete archive and a diff with original files)



