Triggering metrics collection task

To get the most out of your application it is important to refresh the data periodically. You should also be aware that metrics data is gathered from the various integrations through the execution of the Insights task, which is automatically created based on the integrations you have configured when setting up an application. (Note: by default that task is not setup with a schedule). Task can be configured to run periodically by creating a schedule - time based or integration based.

Time based schedule

This is the normal time based trigger. You can configure a cron expression for the schedule.   

If you want to trigger the task every 30 mins, select 'Time Based' for 'Type' and in 'Schedule' field enter */30 * * * * (refer cron job helper link in the field help).

Integration based schedule

Besides time based schedule, you can also setup a schedule based on an Integration. The idea is to monitor specific events on an integration and based on that trigger the task.

To accomplish this select 'Add Schedule' in the Task properties. Select 'Integration' and pick the name of the Integration you want to use. For the selected integration the available events are listed. You can select the event and provide additional configuration.

For example, you can trigger the Insights task based on code being committed into GitHub. Start by selecting 'Integration' as the Type and assuming that there is an integration named Github in the application, select 'Github' for the Integration. Next select 'Commits' for 'Trigger on' and entering the repository details in 'Repo Details' input. Save the settings. (Note: by default, the task will be executed once immediately after a schedule is setup). So any commits in the selected GitHub repository will automatically trigger metrics collection task.

Setting up limits in trend steps

To make the metrics that are collected more useful, it is good to set up limits on the metrics based on your application requirements. Limits allow you to set the value ranges that is acceptable for a specific metric. By default, there are no limits configured, since it is specific to your application. By setting the limits, the metric widgets show up with Red, Amber or Green color indicating the status. The steps in the Insights task that are focused on generating Trend have the option to set limits.  

You can setup limits in trend steps as shown in below example to name a few like Projection count, Key metric card color, Lower limit, Upper limit etc. Depending on these configuration, you will be able to get updated view cards (graphs) accordingly.