Description:
Dataimage.cgi reads an image definition from
/var/lib/remstats/datapage/imagename.image. Some of the commands are in common
with datapage.cgi and are documented
there:
oid, rrd, status, eval, debug, macro, macroend and *EOD*
These retrieve and manipulate data. There are also commands to create
images:
image, colordef, color, linewidth, line, rectangle, circle,
fill, font, text, out, flow
image
The image command has two formats. The first looks like:
image WIDTH HEIGHT
This creates a blank image of the size specified. Sometimes you'll want a
background for the image, and you can use the second form to specify
a file to read for the background:
image BGFILE
This will create the new image the same size as the one in BGFILE,
by reading BGFILE and using its contents as the background. N.B., the
image must be a PNG graphic.
The image command also defines a few colors (see colordef below):
black, white and transparent, sets the current color to
black, fills the image with white and sets the linewidth to 1.
colordef
[It can also be spelled colourdef.]
This defines a new colour and names it. The command looks like:
colordef COLORNAME RED GREEN BLUE
where RED, GREEN and BLUE specify the level of each of those colours
to be mixed to define the colour referred to in the script as COLORNAME.
rectangle
This is a way to draw a rectangle, without useing line 4 times:
rectangle X1 Y1 X2 Y2 [filled]
The co-ordinates (X1, Y1) and (X2, Y2) define oposite corners
of the rectangle. If the keyword filled is added to the end, the
rectangle will be filled with the current colour as well.
flow
This draws a strange double-headed, bi-coloured arrow. Think of it as two
half arrows, split lengthwise, one in each direction. The colour and width
of each half arrow indicates the flow in that direction. I use it for
indicating network traffic flow, which usually isn't the same in both
directions. It looks like:
flow X1 Y1 X2 Y2 INFLOW OUTFLOW
The co-ordinates (X1, Y1), (X2, Y2) indicate the ends of the
flow. INFLOW and OUTFLOW indicate the level in each direction,
relative to (X1, Y1).
[