Task 7: Creating a dashboard to monitor your decision service
You create a dashboard to monitor your deployed decision service. Then, you add charts to visualize its execution activity.
Step 1: Creating a dashboard
After you deploy a decision service, it automatically becomes available as a monitoring source for the dashboards. The service generates data when it is executed, and you create dashboards and charts to showcase and monitor this data.
- Open the main menu, and select Dashboards.
- Click Create +.
- Enter a name for the dashboard, for example
My Service Performance. - Enter an optional description, for example
Dashboard to monitor My Service execution metrics. - Keep the default settings for Permissions (Only me) and Time range (No range).
- Click Save.
The new dashboard opens and is initially empty.
Step 2: Adding a chart to monitor decision execution count
For this first chart, you create a simple metric to show how many times the decision service has been executed. This provides a basic count that helps confirm that your deployed service is sending execution data to the dashboard.
- With the dashboard open, click Chart +.
- Name the chart
Decision execution count. - Select the Metric measurement type.
- Click Create.
- In the Monitoring section, select your deployed decision service as the monitoring source. For this example, the decision service appears with an identifier similar to <My-Getting-Started>/My Service.
- Select the
Countaggregation function. Count calculates the total number of executions. - Leave Group by empty and do not add any filters. You will use this field in the next chart.
- Select Gauge (radial) as the visualization type.
- Click Done.
- Review the chart preview.
- Click the Save icon
to add the chart to the dashboard.
- The chart displays the number of executions, which is typically 1 if you ran the service once in Task 6.
Step 3: Executing the decision service to view updates
In this step, you execute the decision service again and observe how the dashboard updates with the new data.
- Open the Swagger UI for your deployed decision service, as you did in Task 6.
- Run the execute operation again using the same input structure you used previously (or the examples in Step 5).
- Click Execute to submit the request.
- Repeat the execution a few times so the dashboard has new events to display.
- Return to your dashboard and observe that the
Decision execution countchart has increased based on these new executions.
Step 4: Adding a chart with grouping
In this step, you add a chart to monitor decision executions based on the value of the stormAlert field.
- Click Chart +.
- Enter
Executions by storm alertas the chart name. - Select the Metric measurement type.
- Click Create.
- In the Monitoring section, select the same deployed decision service as the monitoring source.
- Select Count as the aggregation function.
- In Group by, select the
stormAlertfield. For this example, it appears in the list as:stormAlert (data > in > weather) – (boolean) - Select Pie as the visualization type.
- Click Done.
- Click the Save icon
to add the chart to the dashboard.
- The chart now displays the number of executions grouped by the value of
stormAlert.
Step 5: Running a few varied executions (example inputs)
- Open the Swagger UI again.
- Run the execute operation again using varied input values like the following examples.
- Return to the dashboard and confirm the gauge and pie have updated.
Example request bodies (adjust names and values as needed):
{ "name": "Jamie", "weather": { "rainForecast": 90, "stormAlert": true, "temperature": "cold" } }
{ "name": "Rashmi", "weather": { "rainForecast": 10, "stormAlert": false, "temperature": "warm" } }
{ "name": "Ava", "weather": { "rainForecast": 75, "stormAlert": true, "temperature": "warm" } }
{ "name": "Leo", "weather": { "rainForecast": 20, "stormAlert": false, "temperature": "cold" } }
{ "name": "Mina", "weather": { "rainForecast": 45, "stormAlert": false, "temperature": "warm" } }
Step 6: Setting a time range (optional)
- In the dashboard toolbar, click the Time range icon
.
- Select Fixed date.
- Set a start time that occurs after your first execution. For example, if your first execution was at 10:15, set the start time to 10:16.
- Keep the end time as the current time or a later time.
- Click Apply changes.
- Confirm that the charts now exclude your earliest execution and display only the more recent ones.
Step 7: Applying a dashboard filter (optional)
- In the dashboard toolbar, click the Filters icon
- Click Add a filter+.
- Choose a field that returns several matching records. For this example, select:
temperature (data > in > weather) – (keyword) - Select an operator, for example
=. - Enter a value that appears in several of your executions, such as
warm. - Click Done.
- Confirm that both charts update to display only the executions where
weather.temperatureiswarm.
Step 8: Monitoring rain forecast with targets and alerts (optional)
In this step, you create a chart to monitor the rainForecast value and configure a target and alert to notify you when it exceeds a defined threshold.
To do this, you first create a Period KPI chart, then define a target value, add a threshold, and configure an alert based on that threshold.
- Create a Period KPI chart that measures the average value of
weather.rainForecastover time. - Open the chart and go to the Monitoring section.
- In the Targets area, click the Add target icon
. - Enter a label for the target, for example
High rainfall threshold. - Specify a target value, such as
60. - In the Thresholds section, click Add threshold
. - Enter a threshold name, for example
High rainfall. - Specify a threshold value, such as
60. - In the same tab, go to the Alerts section and click Add alert
. - Select a condition such as reaches or exceeds the threshold.
- Choose a priority level, for example High.
- Enter a message, for example
Rain forecast is above the expected limit. - Click Done.
Run a few more executions with varied rainForecast values, then return to the dashboard to observe when the threshold line appears and when the alert is triggered.
What to do next
For additional examples of charts and metrics, you can use the Decision Services - Technical monitoring template dashboard.
This template provides a set of predefined visualizations that you can duplicate and adapt to monitor your own decision services.
To continue learning about the main features of Decision Designer, you can explore the samples available in New decision service wizard. For more information about importing samples, see Building decision services. You can also complete the tutorials that are available under Predictive modeling tutorials.