There are two types of configuration required in order to set up metrics trending:
Configure Jobs
Each type of trending object has its own dedicated job that runs to collect data for the object at predefined intervals. Therefore, there are jobs for tickets and vulnerabilities. If you want to establish trending for either type of object you must first enable its job.
The TrendingSchedulerConfiguration.xml allows you to configure job-level settings. These settings consist of the following:
- Whether the job is enabled. By default, enabled is set as false. To turn on the job, you need to set enabled to true as follows: <enabled>true</enabled>. You can also enable the job by going to the RiskVision Administration module, selecting the Scheduled Jobs page, finding the relevant job, clicking in the checkbox to the left of the job name, and selecting the Activate button at the top of the page. You can then click on the name of the job to view and change the execution schedule of the job. The names of the job in the Scheduled Jobs page is Trending Data Collection for Tickets
- The frequency of trending data collection. The line of the TrendingSchedulerConfiguration.xml file where this setting is made is as follows: <frequency>daily</frequency>. Values that can be inserted into the line are daily, weekly, monthly, and yearly.
- Time each day that the job is run. The line of the TrendingSchedulerConfiguration.xml file where this setting is madeis as follows: <values>hours, minutes</values>. For example, if the setting <values>22,0</values> was in place, the job would run every day at 10:00 PM. Note that the job cannot be run more frequently than once per day.
Configure Tasks
Each job has multiple tasks related to the job. Each task represents a query that is run to obtain trending data that can be used for one or more reports that bring back data related to the object type, whether they are tickets or vulnerabilities. By default, tasks are enabled. You can disable some tasks while leaving the rest enabled, if you choose. To disable a task, you can change enabled=”true” to enabled=”false”.
You will notice that some tasks have a line that reads in part <alsoCollect>, such as the following: <query namee="trendTicketWithStageAge" alsoCollect="weekly" startOfWeek="Sunday" start="true">. If you decide to write trending data to the database on a daily basis, you can use this feature to also create weekly summaries of data so that figures such as averages and standard deviations that are difficult to calculate with daily rolled up daily data can be properly calculated. This feature will also create monthly data if it is set to either weekly or monthly.
The startOfWeek ="Sunday" expression treats Sunday as the first day of the week for purposes of writing weekly trend metrics to the database. The start = "true" expression denotes that the trending data will be written to the database on the first day of the week while the end ="true" expression results in the trending data being written to the database on the last day of the week.
There is also a line in the task, as seen in the sample below, that starts with groupBy. Changing the groupBy expression allows you to control how you want to group the data returned by the trending query. For example, in the below sample task you can change from group by type to group by stage.
<task key="owner_priority_type" enabled="true">
<query name="trendTicketWithStageAge" alsoCollect="weekly" startOfWeek="Sunday" start="true">
<groupBy>owner, priority, ticket_type</groupBy>
</query>
</task>
Figure 1 - Sample task
Below is a list of tasks for the two trending jobs:
- Tickets
Tickets
- ticket_type_stage - Provides a list of the open tickets by type with average age and average stage age.
- ticket_owner_stage - Provides a list of the open tickets by owner with average age and average stage age.
ticket_owner_allstage-Provides a list of the closed tickets by owner with average age and average stage age.
ticket_type_allstage - Provides a list of the closed tickets by type with average age and average stage age.
- ticket_priority_stage - Provides a list of the open tickets by priority with average age and average stage age.
- ticket_risk_stage - Provides a list of the open tickets by risk with average age and average stage age.
- owner_priority_type - Provides a list of the open tickets by risk with average age and average stage age.
- closed_ticket_owner_stage - Provides a list of the average age, average stage age, standard deviation age, and standard deviation stage age for closed tickets by owner.
- closed_ticket_type_stage - Provides a list of the average age, average stage age, standard deviation age, and standard deviation stage age for closed tickets by ticket type.
- ticket_entityowner_stage - Provides a list of the average age, average stage age, standard deviation age, and standard deviation stage age for closed tickets by owners of the entities linked to the tickets.