FS
Documentation

Reports

This page was last modified 06:45, 24 May 2017.

From Documentation

(Difference between revisions)
Jump to: navigation, search
Revision as of 06:44, 24 May 2017
Mike (Talk | contribs)
(Specify the sentries and hosts)
← Previous diff
Current revision
Mike (Talk | contribs)
(Advanced logged data report details)
Line 181: Line 181:
The following metacharacters are recognised: The following metacharacters are recognised:
-{| class="wikitable"+{| class=wikitable border=1 cellspacing=0 cellpadding=3
|- |-
!Symbol !!Meaning !!Example !!Result !Symbol !!Meaning !!Example !!Result
Line 198: Line 198:
These tables show how As columns affects the output produced. In this example, we are reporting on the MBused and MBtotal variables for the filesystems / and /usr: These tables show how As columns affects the output produced. In this example, we are reporting on the MBused and MBtotal variables for the filesystems / and /usr:
-{|+{| class=wikitable border=1 cellspacing=0 cellpadding=3
|+When "As Columns" is not selected: |+When "As Columns" is not selected:
|- |-
Line 213: Line 213:
-{| class="wikitable"+{| class=wikitable border=1 cellspacing=0 cellpadding=3
|+When "As Columns" is selected: |+When "As Columns" is selected:
!Date !!Time !!MBused(/) !!MBtotal(/) !!MBused(/usr) !!MBtotal(/usr) !Date !!Time !!MBused(/) !!MBtotal(/) !!MBused(/usr) !!MBtotal(/usr)

Current revision

The Service Level Report summarizes state changes for selected sentries, based on data from the Event Manager log. It shows the proportion of time sentries have spent in each state.

The Logged Data report extracts historical variable data for a single sentry from the sentry logs. It is like a version of the realtime graph option that extends back in time, and can also be output to a table or file.

You can use these to analyse changes in the data leading up to an event, or look for trends in the amount of time sentries are spending out of their normal state.

There are three ways to view the reports:

Contents

Service Level Report

The Service Level Report extracts historical data for selected sentries on one or more hosts. It searches through the Event Manager logs and generates an aggregated report on the percentage of time each sentry has spent in each state or severity level.

One report can provide data about multiple sentries running on multiple hosts. You can either preselect the sentries or specify them in the report details.

To Generate a Service Level Report

Image:Sentinelfigure15.jpg
Figure 15 — Example: saving a Service Level Report to file

Specify the period of the report

Specify the output format

This option is only available when you are displaying the console using the COSmanager PCgui for Windows.

If you selected Output as: File, enter the output file name.

Specify the sentries and hosts

Use the options on the Maintain menu to work with the list of sentries to be included in the report. For example, select Maintain > Add to add a sentry to the list or select Maintain > Change to change the details of a selected sentry.

To report on all instances of this sentry, select All instances. To report on only specified instances, unselect All instances and enter one or more instance names or patterns in the Instance/pattern fields.

The following metacharacters are recognised:

Symbol Meaning Example Result
? Matches any single character in this position /dev/hd? Includes: /dev/hda /dev/hdb /dev/hdc
* Matches one or more characters in this position. /dev/hda* Includes: /dev/hda /dev/hda1 /dev/hda10
! At the start of a pattern, excludes instances matching the pattern. !/dev/hdc* Excludes: /dev/hdc /dev/hdc1 /dev/hdc10
Metacharacter support for sentry specification

When you have finished filling in the ‘Add/Change Service sentries’ form, click Accept to save the sentry details. When you have finished adding instances, press F3 in the ‘Sentries to report on’ window to return to the ‘Run service level report’ form.

To generate the report

Image:Sentinelfigure16.jpg
Figure 16 — Sample Service Level Report in graph format

Click the secondary mouse button (e.g. right-click on a mouse configured for a right-handed person) to show the context menu. The context menu has options to change the appearance of the graph, such as the axes and labels. To dismiss the graph, press F3 or Exit from the context menu.

To save the report

If you don’t wish to save the report, click Exit. If you wish to save the details of this report and rerun it later, click Save the report.

Enter the report name and a description.

Click Accept to save the report.

Running the Service Level Report from the Command Line

A service level report can optionally be run from the command line, using a command called service_report. The simplest method is to load a previously saved report. Using the following flags, you can override the parameters of a saved report.

To run the service_report script, you need to be in a Sentinel3G environment.

This can be achieved by the following:

cos sentinel -c service_report [ options] [ sentries/instances]

Service Level Report Command Line Interface

Synopsis
service_report [-r] [-h <hosts>] [-l <report name>]
[-F <sentry file>] [-s <start date>] [-e <end data>]
[-p < period>] [-t < output type>] [-o < output file>]
[-f < log location>] [ <sentries/instances>]</code>
Options
-r
Generate a state-based report, rather than a severity-based report (default). Totals the time sentries have been in what states, instead of at what severity.
-h <" host1 host2 …>"
Specify a list of hosts over which to perform the report. The host names must be space separated and the list must be enclosed in double quotes.
-l <report name>
Specify a previously saved service level report. Any other flags specified will override the saved values.
-F <sentry file>
Specify a file containing sentries and instances you want to report on. The format of the file is as follows: each line contains a tabseparated list. The first entry on a line is the name of the sentry, and the following entries are instance patterns (to a maximum of 8). For example:
CPU_State
Free_Space / /usr /boot
Processes inetd crond smbd nmbd

If you have more than 8 instances you want reported on, just add another line with the same sentry name and the other instances.

-s <start date>
Start the report on this day. The date must be specified in the format YYYYMMDD. If not supplied, the start date is calculated based on the period and end date. In addition, if no end date is specified, the start date defaults to today’s date.
-e <end date>
End the report on this day. The date must be specified in the format YYYYMMDD. If not supplied, the end date is calculated based on the period and start date.
-p <period> 
Period of the report. This will calculate the start or end date. If you specify both a start and end date, this option is ignored. The valid periods are: Quarter, Month, Fortnight, Week, Day and Open. The default period is Week. Note: Monthly and Quarterly reports always end on the last day of last month.
-t <output type>
Specify the output type. Valid types are Graph, Table, File and Export. If an output file is supplied, the output type will always be file. If no output type is given, the data will just be written to stdout in FS database format.
-o <output file>
Specify what file you want the output of the report to be written to Supplying an output file will force the output type to be File.
-f <log location>
Location of the Sentinel3G event log files. These files are named EMdata. date where date is of the form YYYYMMDD. They are stored under the db/Log directory on the Event Manager host.

Logged Data Report

The Logged Data report extracts historical variable data for a single sentry from the sentry logs. It is like a version of the realtime graph option, but shows historical data as well as current data, and has the option to output the results as a table or file as well as a line graph.


Note
Data for a sentry can only be graphed if the numeric variables to appear on the graph have already been designated as logged variables in the Data Logging section of the sentry’s Advanced options details.


To Generate a Logged Data Report

Figure 17 — Specifying a Logged Data report
Figure 17 — Specifying a Logged Data report

Specify the period of the report

Specify how to display the output

If you selected Output as: Command, the Command field is mandatory. The retrieved data is piped in Functional Database format to the stdin of the command. The command runs with the environment of the user ID that started Sentinel3G.

The Command field is optional for the other output types. You can use it to filter the retrieved data before it is displayed, saved or exported.

If you selected Output as: File, enter the output file name.

Advanced logged data report details

Click Advanced to specify some additional report criteria.

The fields in the ‘Instances’ group vary depending on the type of sentry and the output type.

To report on all instances of a multi-instance sentry, select All instances. To report on only specified instances, unselect All instances and click Instances to display the ‘Instances to report on’ window. From this window you can enter a list of instance names or patterns to be included in or excluded from the report.

The following metacharacters are recognised:

Symbol Meaning Example Result
? Matches any single character in this position /dev/hd? Includes: /dev/hda /dev/hdb /dev/hdc
* Matches one or more characters in this position. /dev/hda* Includes: /dev/hda /dev/hda1 /dev/hda10
! At the start of a pattern, excludes instances matching the pattern. !/dev/hdc* Excludes: /dev/hdc /dev/hdc1 /dev/hdc10

When you have finished adding patterns, press F3 in the ‘Instances to report on’ window to return to the ‘Advanced logged data report details’ form.

As columns is only available when you have selected a multi-instance sentry to report on. When this field is selected, each of the variables for each of the instances will be displayed as columns, not as one row per instance.

These tables show how As columns affects the output produced. In this example, we are reporting on the MBused and MBtotal variables for the filesystems / and /usr:

When "As Columns" is not selected:
Date Time Instance MBused MBtotal
01/02/2012 16:00 / 47 150
01/02/2012 16:00 /usr 680 2048
01/02/2012 17:00 / 46 150
01/02/2012 17:00 /usr 680 2048


When "As Columns" is selected:
Date Time MBused(/) MBtotal(/) MBused(/usr) MBtotal(/usr)
01/02/2012 16:00 47 150 680 2048
01/02/2012 17:00 46 150 680 2048

The As columns option is available for the table, command and export output types. It is also available for the graph output type, but only in the case where you are reporting on a single instance of a multi-instance sentry.

You can optionally average the data for the report by ticking Average and selecting a period. The resulting information is displayed with a time entry matching the beginning of the selected period.

For example, if you choose to average the data over an hour, there will be 24 data entries per day, each of which lies on an hour boundary. The value will be the average of all the data over the following hour.

For numeric data, the average is taken to be the mean of the values, weighted by the amount of time spent at that value. For non-numeric data, the average will be the mode (the most common) of the values, also based on time spent at that value.

You can specify an alternate location for the host monitor log files in the Data directory field. By default the log files are stored in db/Log under the Sentinel3G installation directory on each host.

Sentinel3G must be able to collect data from each host that it reports on. This means that each host must be up and running Sentinel3G at the time the report is generated.

When you have finished filling in the ‘Advanced logged data report details’ form, click Return to complete the remaining fields in the main ‘Logged data reporting’ form.

Variables

If you chose to output the report as a graph, you can now select up to five individual agent variables whose values are to be graphed, or specify All variables if you wish all the relevant variables to be graphed.


Note
If you see this message: “There is no numeric logged data for this sentry suitable for graphing” the problem is that there are no numeric logged variables specified for this sentry. See Advanced options.

Tick the State/Severity field to include state and severity information in the report.

Specify graph details

Click Graph details to specify some attributes of the graph output.

The first two fields control the scale on the graph’s Y-axis. If Min value and Max value are not specified, the Y-axis will be sized to the current minimum and maximum data value. This means the scale may change as new values are graphed. To keep the scale constant, set both Min value and Max value.

Use close minimum and maximum values if you want to focus on relatively small differences among data values. For example, if a set of variables is mainly of interest when the values are clustered near 100%, a minimum value of 90 will help to separate them.

Min value
The minimum value to display next to the Y-axis. If the values will always be positive, set Min value=0.
Max value
The maximum value to display next to the Y-axis.
Scale to max?
(For stack charts only) Tick this checkbox if you want the values to be scaled so that their sum equals Max value. This is useful where the total adds up approximately to Max Value. Scaling ensures a flat top to the stack.

If you are graphing variables from a single sentry instance, you can also specify a color, label and scaling factor for each specified variable. This option is available if you are working with a single-instance sentry, or if you have selected one instance of a multi-instance sentry and As columns is not selected.

For each variable you selected on the Logged Data Reporting form, specify these details:

Color
Select the color to be used to display this variable.
Label
If you wish you can change the default label displayed for this variable. For example, if you wish to scale down a value for free disk space by a factor of 1000, you could also change the label to read GB (gigabytes) instead of MB (megabytes).
Scale by
This is an optional scaling factor. The values displayed will be multiplied (scaled up) by this factor. Use this to convert very large or small numbers to more manageable units. Example: specify 0.001 to divide the reported values by 1000.

When you have finished specifying the report, click Accept to generate the graph.

Viewing a sample graph

Click the secondary mouse button (e.g. right-click on a mouse configured for a right-handed person) to show the context menu. The context menu has options to change the appearance of the graph, such as the axes and labels. To dismiss the graph, press F3 or Exit from the context menu.


Image:Sentinelfigure18.jpg
Figure 18 — Sample Logged Data report in graph format

To save the report

If you don’t wish to save the report, click Exit. If you wish to save the details of this report and rerun it later, click Save the report .

Enter the report name and a description. You can also enter a title to appear at the top of the output.

Click Accept to save the report.