X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=doc%2Frrdcgi.pod;h=e999fea0966071d0e3f04fb2129c22de9ba34ea2;hb=09fa22ce43438f77625e759d7b29d8ae6bc56084;hp=c48b059d8ec6f627b0ea6a0444cc2f86da50e377;hpb=5837606887a6d81e8b1f7588525cb1c8783fb62b;p=rrdtool.git diff --git a/doc/rrdcgi.pod b/doc/rrdcgi.pod index c48b059..e999fea 100644 --- a/doc/rrdcgi.pod +++ b/doc/rrdcgi.pod @@ -1,15 +1,10 @@ =head1 NAME -rrdcgi - create web pages containing RRD graphs based on templates - -=for html
PDF version.
+rrdcgi - Create web pages containing RRD graphs based on templates =head1 SYNOPSIS -#!/path/to/B -S<[B<--goodfor>|B<-g> I]> -S<[B<--filter>]> -S<[B<--refresh>|B<-r>]> +C<#!/path/to/>B S<[B<--filter>]> =head1 DESCRIPTION @@ -18,7 +13,7 @@ is to run as a cgi-program and parse a web page template containing special ERRD:: tags. B will interpret and act according to these tags. In the end it will printout a web page including the necessary CGI headers. -B parses the contents of the template in 2 steps. In each step it looks +B 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. @@ -30,14 +25,9 @@ The argument parser uses the same semantics as you are used from your c shell. Assume that rrdcgi is being run as a filter and not as a cgi. -=item B<--refresh>|B<-r> - -If the B<--goodfor> flag is specified, then B<--refresh> will cause rrdcgi -to output a Refresh header with the value of the B<--goodfor> value. - =back -=head2 Pass 1 +=head2 Keywords =over 8 @@ -67,11 +57,6 @@ Get the value of an environment variable. might give you the name of the remote user given you are using some sort of access control on the directory -=back - -=head2 Pass 2 - -=over 8 =item RRD::GOODFOR I @@ -93,21 +78,38 @@ could use to make sure everything is presented in Universal Time. Note that the values permitted to TZ depend on your OS. +=item RRD::SETVAR I I + +Analog to SETENV but for local variables + +=item RRD::GETVAR I + +Analog to GETENV but for local variables + =item RRD::TIME::LAST I I This gets replaced by the last modification time of the selected RRD. The -time is I-formated with the string specified in the second argument. +time is I-formatted with the string specified in the second argument. =item RRD::TIME::NOW I -This gets replaced by the current time of day. The -time is I-formated with the string specified in the argument. +This gets replaced by the current time of day. The time is +I-formatted with the string specified in the argument. -=back +Note that if you return : from your strftime format you may have to escape +them using \ if the time is to be used as an argument to a GRAPH command. -=head2 Pass 3 +=item RRD::TIME::STRFTIME I I I I -=over 8 +This gets replaced by a strftime-formatted time using the format +I on either I or I depending on +whether I or I is specified. Both I and I +must be supplied as either could be relative to the other. This is intended +to allow pretty titles on graphs with times that are easier for non RRDtool +folks to figure out than "-2weeks". + +Note that if you return : from your strftime format you may have to escape +them using \ if the time is to be used as an argument to a GRAPH command. =item RRD::GRAPH I @@ -127,7 +129,7 @@ be used: Note that %s stands for the filename part of the graph generated, all -directories given in the GIF file argument will get dropped. +directories given in the PNG file argument will get dropped. =item RRD::PRINT I @@ -147,7 +149,7 @@ The example below creates a web pages with a single RRD graph.

RRDCGI Example Page

- @@ -172,7 +174,7 @@ you want to use a source for your graph.

Graph

- .gif --lazy + .png --lazy --title "Temperatures for " DEF:cel=.rrd:exhaust:AVERAGE LINE2:cel#00a000:"D. Celsius"> @@ -192,8 +194,8 @@ cgi-bins are seperate directories

RRDCGI test Page

' + /.../web/pngs/testhvt.png + --imginfo '' --lazy --start -1d --end now DEF:http_src=/.../rrds/test.rrd:http_src:AVERAGE AREA:http_src#00ff00:http_src @@ -203,7 +205,7 @@ cgi-bins are seperate directories Note 1: Replace /.../ with the relevant directories -Note 2: The SRC=/.../gifs should be paths from the view of the +Note 2: The SRC=/.../pngs should be paths from the view of the webserver/browser =head1 AUTHOR