rrdcgi - create web pages containing RRD graphs based on templates
#!/path/to/rrdcgi
[--filter]
rrdcgi is a sort of very limited script interpreter. Its purpose
is to run as a cgi-program and parse a web page template containing special
<RRD:: tags. rrdcgi will interpret and act according to these tags.
In the end it will printout a web page including the necessary CGI headers.
rrdcgi parses the contents of the template in 3 steps. In each step it looks
only for a subset of tags. This allows to nest tags.
The argument parser uses the same semantics as you are used from your c shell.
- --filter
-
Assume that rrdcgi is being run as a filter and not as a cgi.
- RRD::CV name
-
Inserts the CGI variable of the given name.
- RRD::CV::QUOTE name
-
Inserts the CGI variable of the given name but quotes it, ready for
use as an argument in another RRD:: tag. So even when there are spaces in the
value of the CGI variable it will still be considered as one argument.
- RRD::CV::PATH name
-
Inserts the CGI variable of the given name, quotes it and makes sure
the it starts neither with a '/' nor contains '..'. This is to make
sure that no problematic pathnames can be introduced through the
CGI interface.
- RRD::GETENV variable
-
Get the value of an environment variable.
-
<RRD::GETENV REMOTE_USER>
-
might give you the name of the remote user given you are using
some sort of access control on the directory
- RRD::GOODFOR seconds
-
Specify the number of seconds this page should remain valid. This will prompt
the rrdcgi to output a Last-Modified, an Expire and if the number of
seconds is negative a Refresh headers.
- RRD::INCLUDE filename
-
Include the contents of the given file into the page returned from the cgi
- RRD::SETENV variable value
-
If you want to present your graphs in another time zone than your own, you
could use
-
<RRD::SETENV TZ UTC>
-
to make sure everything is presented in Universal Time. Note that the
values permitted to TZ depend on your OS.
- RRD::SETVAR variable value
-
Analog to SETENV but for local variables
- RRD::GETVAR variable
-
Analog to GETENV but for local variables
- RRD::TIME::LAST rrd-file strftime-format
-
This gets replaced by the last modification time of the selected RRD. The
time is strftime-formated with the string specified in the second argument.
- RRD::TIME::NOW strftime-format
-
This gets replaced by the current time of day. The
time is strftime-formated with the string specified in the argument.
- RRD::TIME::STRFTIME START|END start-spec end-spec strftime-format
-
This gets replaced by a strftime-formatted time using the format
strftime-format on either start-spec or end-spec depending on
whether START or END is specified. Bng> f
somewhat more convenient manner.
- filename.rrd
-
The name of the RRD you want to dump.
To transfer an RRD between architectures, follow these steps:
=item 1.
On the same system where the RRD was created, use rrdtool dump
to export the data to XML format.
Transfer the XML dump to the target system
Run rrdtool restore to create a new RRD from the XML dump. See
rrdrestore for details.
To transfer an RRD between architectures, follow these steps:
On the same system where the RRD was created, use rrdtool dump
to export the data to XML format.
Transfer the XML dump to the target system
Run rrdtool restore to create a new RRD from the XML dump. See
rrdrestore for details.
Tobias Oetiker <oetiker@ee.ethz.ch>