I.4. Overnight archiving

The system is designed to make it easy to archive all graphs or svg, png, xml, etc files over night. The graphs hold 1000 data points, which is 27 hours 46 minutes. This means you can access a full day's data for the previous day in the first 3 hours 46 minutes of the new day (2 hours 46 or 4 hours 46 when clocks change in previous day). As such it is recommended that over night archiving is done of the previous day just after midnight.

The recommended command to run just after midnight is wget --quiet --no-parent --mirror http://host:port/cqm/`date +%F -dyesterday`/z/ as this will create a directory for the server, cqm, date, and z, and then the files. The use of z clears text off the graphs to make them clean. Using Z does SVG with no style included, so expecting to be used with a separate style sheet when presented.

I.4.1. Full URL format

The full URL format allows several variations. These are mainly to allow sensible directory structures in overnight archiving.

Table I.5. URL formats

URLMeaning
/cqm/All CQM URLs start with this
32-hex-characters/Optional authentication string needed for untrusted access. Can be used with trusted access to test the authentication is right
YYYY-MM-DD/Optional date to restrict output. Can also be in the form YYYY/MM/DD, YYYY-MM/DD, YYYY/MM-DD if preferred. Can also have /HH or -HH on the end to get data for just one hour, and /HH-HH, or -HH-HH on the end for a specific range of hours. Can end /HH:MM:SS or -MM:MM:SS for data for one hour from a specific time.
options/Optional graph colour control options. Useful when extracting a list of images as the all must have the same options as the list is just graphname.png as a relative link thereby ensuring all graphs appear in this directory. The options list can include / separators rather & separators to make apparent subdirectories.
ext/The file extension can be included on the end of the options, this is used only for making the index of all graphs for that type (see below)
graphnameGraph name. For XML this can be just * to produce one XML file with all graphs.
.extExtension for file type required
?optionsOptions can alternatively be included as a html form get field list

Where no graph name or ext are provided, i.e. the index page of a directory then an html page is served. An ext/ can be included after any options to make a list of files of that type. Otherwise the index is an html page explaining the options.

A blank graph is available by accessing simply .png (i.e. no graph name).

An xml list of all graphs is available as .xml.

A csv list of graph name and score is available as .csv and similarly for txt and tsv.

A special case exists for extracting the xml files for all graphs in one request, using the name *.xml.

I.4.2. load handling

The graphs and csv files are generated on the fly, and only one is generated at a time. Connection requests are queued. As part of the normal web management system, the trusted IPs queue is always processed first so constant access from untrusted sources will not stop access from trusted sources. If the queue is full the connection is not accepted. The most load applies when archiving, but tools like wget fetch one linked file at a time which is ideal.