HTML Reporting Template

From ServersCheck Wiki

Jump to: navigation, search

Serverscheck can produce real-time reports on the status of each rule. This option is activated through the ServersCheck configuration file (cfr previous section).

At the end of each rule cycle, ServersCheck will create a general report with hyperlinks to a report on each individual rule. The report is produced based upon an HTML template file that is located in the templates directory in your ServersCheck installation directory. You can create your own template so that reports are created in your own look and feel. The filename of the template always needs to be template.htm (case sensitive!).

The template consists of 4 sections:

1. header

2. body

3. graphs area

4. footer


1. Header

The header is the section of the document that starts at the beginning of the file until the following string is found (case sensitive!): <!-- checks start -->

2. Body

The body is the place where each rule will be included. As ServersCheck executes each rule after the other, this section is a loop. The section starts at the first line after the string <!-- checks start --> and until <!-- checks end --> .

Between the two delimiters you can select which values of a rule have to be displayed. These are the settings:

<!--id--> is the unique ID of the rule

<!--label--> is the label of the rule

<!--checktype--> is the type of rule

<!--check--> is the definition of the rule

<!--laststatus--> is the last known status of the rule

<!--sla--> is the current service level in % of the rule

<!--upchecks--> is the number of times the rule was performed OK

<!--downcheck--> is the number of times the rule was performed not OK

<!--lastuptime--> indicates the last time the rule returned a OK status

<!--lastdowntime--> indicates the last time the rule returned a DOWN status

<!--value--> is the last value retrieved for that rule

<!--lastdownreason--> is the reason why the rule did not execute correctly


3. Graphs

Graphs are outputted after the body section (!) and is inserted where following string is located: <!-- insert graphs -->

4. Footer

The footer section of the document starts at <!-- checks end --> until the end of file. In this section the graph tag can be inserted.

Personal tools