Use this Knowledge Script to generate a report from data in the archive and aggregate tables.
If you choose to move data from the archive table to the aggregate tables, that data is then aggregated by hour, day, and month.
Briefly, the aggregation process works as follows:
A preference is specified for the number of months’ worth of data to keep in the archive table (for example, the three most recent months’ worth).
For all older data, an hourly average, minimum, maximum, sum, and count value are calculated. Those hourly values are then moved to the hourly aggregate table: ArcAvgHourlyData. Each hour’s worth of data is then represented by five data points: average, minimum, maximum, sum, and count.
The hourly aggregate table keeps three months’ worth of data.
For all older data, a daily average, minimum, maximum, sum, and count value are calculated. Those daily values are then moved to the daily aggregate table (ArcAvgDailyData). Each day’s worth of data is then represented by five data points (average, minimum, maximum, sum, and count).
The daily aggregate table keeps six months’ worth of data.
For all older data, a monthly average, minimum, maximum, sum, and count value are calculated. Those monthly values are then moved to the monthly aggregate table (ArcAvgMonthlyData). Each month’s worth of data is then represented by five data points (average, minimum, maximum, sum, and count).
The monthly aggregate table keeps data indefinitely.
Once information is moved from the source table to the destination table, it is deleted from the source table.
This script lets you generate a report that gives the hourly, daily, weekly, or monthly average, minimum or maximum value for selected datastreams over the time range you specify (for example, the monthly average of memory used by SQL Server processes over the last year).
Report agent
The default schedule is Run once.
Set the following parameters as needed:
Parameter |
How To Set It |
---|---|
Data source |
|
Select data wizard |
Select the data for your report by Knowledge Script or by datastream. |
Select the style |
Select the style for the first page of the report:
|
Select time range |
Filter the data in your report by a specific or sliding time range. The default is Sliding. |
Select average, minimum, or maximum |
Select the type of value you want to represent in your report. |
Aggregation interval |
Select the time period by which the data in your report is aggregated:
|
Report settings |
|
Include parameter help card? |
Set to y to include a table in the report that lists parameter settings for the report script. The default is y. |
Include table/chart/both? |
Select the type of datastream values you want to include in the report:
|
Select chart style |
Define the graphic properties of the charts in your report. |
Select output folder |
Set parameters for the output folder. |
Add job ID to output folder name? |
Set to y to append the job ID to the name of the output folder. A job ID helps you correlate a specific instance of a Report Script with the corresponding report. The default is n. |
Select properties |
Set miscellaneous report properties as desired. |
Add time stamp to title? |
Set to y to append a time stamp to the title of the report, making each title unique. The time stamp contains the date and time the report was generated. A time stamp allows you to run consecutive iterations of the same report without overwriting previous output. The default is n. |
Event notification |
|
Event for report success? |
Set to y to raise an event when the report is successfully generated. The default is y. |
Severity level for report success |
Set the event severity level, from 1 to 40, to indicate the importance of the event. The default is 35 (magenta level indicator). |
Severity level for report with no data |
Set the event severity level, from 1 to 40, to indicate the importance of the event. The default is 25 (blue level indicator). |
Severity level for report failure. |
Set the event severity level, from 1 to 40, to indicate the importance of the event. The default is 5 (red level indicator). |