ReportBase:Service Templates

From CustosecWiki
Jump to navigation Jump to search
New Service Template Dialogue Step 1/9
New Service Template Dialogue Step 2/9
New Service Template Dialogue Step 3/9
New Service Template Dialogue Step 4/9
New Service Template Dialogue Step 5/9
New Service Template Dialogue Step 6/9
New Service Template Dialogue Step 7/9
New Service Template Dialogue Step 8/9
New Service Template Dialogue Step 9/9
Service Template Manage Rules

Service Templates contain the definitions to create charts based on the results of service checks out of ARANSEC / CustoSec.

Please Note: New Templates can only be created by users with a "User" or "Report" Role. "Managers" can not create templates.


Creating a new Service Template

The creation of Service Templates requires a 3 step process.

  • Creating the Template: Creating the template with the "New Service Template Assistant"
  • Defining the Rules: Definition of rules to extract data out of the check respond strings
  • Enabling (Activating) the Template: Activation of the template.


Creating the Template

The dialogue to add a new Service template can be opened through the Main menu ("Templates" => "New" => "Service"). This will start an assistant that leads through the process of creating a Service Template in 9 steps.

Service Template Assistant - step 1/9

In Multi-Source Systems the source must be selected using the drop down menu. In a Single Source System the source is fixed and cannot be changed.

Service Template Assistant - step 2/9

Choose a host on which the service check is made.

The Filter restricts the available hosts by using the date when the last host entry was recorded in ReportBase. Find out more on Template Filters.

Service Template Assistant - step 3/9

Choose the service from the drop down list. The list will only present services that have been defined for that host. The Filter restricts the available services by using the date when the last service entry was recorded in ReportBase. Find out more on Template Filters.

Service Template Assistant - step 4/9

A text to identify the report (name). This identifier is used in many areas of the system and can be maximum 30 characters long. Allowed characters are a-z, A-Z, ä, ö, ü, ß, Ä, Ö, Ü, 0-9 and space.

Service Template Assistant - step 5/9

The data source and Template based on Status or Value are defined here. The Template can be based on the text status (Service State) of the check or the numeric value recorded in the Performance or Output Data areas. IMPORTANT: When the template has been created this information cannot be changed.

Report based on text status

The report will be based on the Service State (OK, Warn, Critical or Unknown) of the check. When using this option the Service Output and Performance Data are not required.

Report based on status

The report will be based on the Status of the check. Only one value for the status can be marked as basis for the chart.

Report based on value

The report also includes the "Warn" and "Critical" values in addition to the Status of the check. This option is very useful for reports that should display their warn- and critical values.

Data Source

There is a choice between "Service Output Data" and "Service Performance Data". Depending on the check and how it has been programmed, the information in these two text fields can be very different. The "Service Performance Data" usually only contains the information that is needed to identify the status of the service (ok, warn, critical, unknown). The "Service Output Data" provides all return values of the check, as well as "Warning"- and "Critical"-thresholds.

To make sure, all information is available, both data-fields ("Service Output Data" and "Service Performance Data") are provided. The last recorded entry in ReportBase is displayed.

In both cases the content of the database field is displayed, which normally contains different information in a string. (Example: "lost 0%?rta=0.148ms;200.000;500.000;0; pl=0%;40;80;;?" in case of a icmp-check). Depending on how the check has been programmed, the information is seperated by "Delimiters". Choosing the right delimiter will split the string into individual ("virtual") fields that can be marked.

For a Report based on status: One of these "virtual" fields containing the data can be chosen. Clicking the "Mark" Button will highlight the value.

For Report based on value: After choosing and marking the "value" two additional fields should chosen and marked for "Warn" and "Critical".

"Validate" tests your selection displaying the VALUE= followed by the optional WARN= and CRITICAL= values.

Note: At this stage only the location and order of the "virtual" fields has been made. These "virtual" fields may contain additional unwanted data. The "Defining the Rules" will create a rule to extract the actual value.

Service Template Assistant - step 6/9

The period for which the report should gather data. ReportBase provides several predefined intervals as well as a free interval.

  • Current State: Only the current state of the service is displayed in the chart
  • Current Day: The current day from Midnight till now
  • Last 24 Hours: Last 24 hours from now
  • Current Week: The current week from the week begin, as defined in the System Properties, until now. (See below - Overrule Default Week begin)
  • Current Month: The current month, from the 1st of the month until now
  • Current Year: The current year from the 1st of January until now
  • Other: This is a user defined interval and can be in hours, days, weeks and months

Besides that the following additional settings can be made:

  • Overrule Default Week Begin: This is ignored when "Current State" has been selected. Depending on the settings in the system properties the default for the begin of a week is Sunday (Anglo Saxon and US Calendars) or Monday (European Calendars). This can be overruled for this particular template by activating this option. In this case there will be a step 6a to set the Week Begin for this report.
  • Base Report on last Data Collection: This is ignored when "Current State" has been selected. This setting is the default setting. The time interval is calculated with "now" taken from the last database entry (last data collection). I.e. A host that is deleted in ARANSEC/CustoSec will not send any check information any more. The chart that is made to show its status would therefore "freeze" with this setting.
  • Base Report on System Time: This is ignored when "Current State" has been selected. The time interval is calculated with "now" taken from the system time. In the above example this means, the chart for a deleted host would run out and instead of a chart an empty image will be shown with the remark "no data".

Service Template Assistant - step 7/9

The location in this dialogue cannot be changed.

  • Format: The format for the export data based on this template can be configured here. Data can be exported in "CSV", "XML" - Format or as a plain text file.
  • Export Data: Activate or deactivate data export.

Service Template Assistant - step 8/9

This step collects the first settings for the chart. The following settings are available:

  • Display Image: Depending on the template one or more chart types can be selected. Time Series Chart can only be used for Service Checks based on a time period. Dial, Meter and Thermometer charts can be used for current Service Checks. Pie and Ring charts are used to report on the state of a check (Host or Service).
  • Image Format: There are two options for the output format of the chart. "png" (Default) or "jpg"-File.
  • Image Size: The image size (width/height) in pixels.

Service Template Assistant - step 9/9

By activating "Revolving Reports" this chart (and data export) will be refreshed in the given interval. If this option is not activated, the report will only be produced on "manual" request.

  • Refresh: The Refresh time is entered in seconds. The default refresh time is defined by the Source. See "Modify a source" - "Revolving Reports". The refresh time cannot be decreased below the system properties default setting.
  • Remarks: Additional description of the template can be added here and is displayed on all lists.

The "Save"-Button saves the template and exits the assistant. The new template will be listed in the "Revolving Reports"-List if it was defined as a revolving report. In the "Activated"-column there will be a red cross.

If is was not defined as a revolving report, the template will be listed in the "Manual Reports"-List.

The text "missing" will appear in the column titled "Rule".

Defining the Rules

The definition of template rules is a very important feature within ReportBase. All service templates that are not based on text status will require additional rules to be able to extract the necessary data. Or, differently said, the rules are important for all templates that use numeric data out of the string for the chart (like i.e. time charts).

The "Rules" - feature in ReportBase allows handling all kinds of reports from different service checks and keeps the system flexible enough to handle even service checks that are not following official NAGIOS programming standards (Read more about the Flexibility Concept).

The "Manage Rules" in the context menu or the Main Menu/Templates opens the templates rules.

  • Rule: A rule has to be defined for each service state a check can be in (OK, Warn, Critical or Unknown). The display shows the last entry in the database for that state. If the drop down is opened, all entries existing in the database will be shown. Note: States not existing in the database will not be shown, which means, if a check never has been critical, but only been OK and WARN, CRITICAL will not be shown in this list.
  • Use Default: Can be ticked, when checks answer for certain service states with unusable strings. In these cases the database entry can be overruled by a default value when creating a chart. The Input string and anchors will not be used at all. The displayed default value can be changed.
  • Input: This field displays the actual entry in the "virtual" field, as it has been chosen and marked in step 5 of the template creation process.
  • Left and Right Anchor: To extract a specific value out of the string, a left and a right anchor have to be marked in the input field. This allows ReportBase to deal with strings of variable length.
  • Default: This is the default value to be used, when a fixed value for a service state should be used instead of a value out of the string.
  • Validate: By clicking "Validate" the final value will be displayed using the Left and Right Anchors.

Formatting Unit: This section allows to fine tune the rules to deal with high numbers or different units of measure. It is not obligatory to set the data format but it is useful to use a unit that best describes the data.

  • Formatting Style: The drop down menu provides a list of different units of measure (Formatted Units) to choose from. The list contains all the predefined as well as the user defined Formatted Units. If, for example, the number used for the chart represents a percentage then the Percent Formatted Unit should be used as the formatting style.

See also the section ReportBase:Properties:Formatted Unit.

  • Display Lower / Display Upper Limit: The expected lower and upper limit for the chart. These settings are used when creating the chart with the correct range and setting the y-axis of the chart.
  • Use Factor: The factor used to recalculate the data. Some checks may report the size of a hard drive or the memory in a Server in bytes. This number could be very large but by using the factor could reduce the size of the number by converting the bytes to Kilo, Mega or Giga bytes. The method applied by the factor can be '/' - divide, '*' - multiply, '+' addition or '-' - subtraction.

NOTE: For all predefined Formatted Units with the exception of 'User defined' the factor and method cannot be changed. Changes made to the selected Formatted Unit are specific to the template. However once a template uses a Formatted Unit it cannot be removed.

These Rules have to be set for all service states that are available. After finishing the definition of all rules, they can be saved.

Note: Rules can be changed at any time.

Enabling (Activating) a Service Template

A Service Template can be activated / enabled in two different ways:

  • By using the Main Menu => "Templates" => "Modify" => "Report properties". This will open a search screen for templates. After selecting the template to be activated, the "Modify" - Dialogue for the report will open. In the top right corner the tick-box "Enabled" needs to be activated to enable the template.
  • By right clicking or double clicking on the template in the list and choosing "Activate/Deactivate" in the context menu.

Once a template is activated the red cross will change to a green OK in the Template List in the Main Panel.

After creating a service template the layout of the template at first is set based on the default colours.