---
schema_version: "1"
id: f18ec92ca2d82f479da04ddd3765e8f9baba4e49c2f0c59234ee27a8a7f841bb
title: Configuring Singlestats in a Custom Dashboard
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/monitoring/dashboard-custom-config-singlestat.md
canonical_url: https://docs.mulesoft.com/monitoring/dashboard-custom-config-singlestat
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 2519161f687514180242f00f20d301551b4980b4d17bde81adef47758b0d4f78
description: Configure singlestat charts in MuleSoft Anypoint Monitoring custom dashboards to display a single aggregated metric value for a Mule app or API.
latest: true
---
---
product: Monitoring
description: Configure singlestat charts in MuleSoft Anypoint Monitoring custom dashboards to display a single aggregated metric value for a Mule app or API.
keywords: MuleSoft, Anypoint Monitoring, custom dashboards, singlestat chart, aggregated metrics, dashboard visualization, Mule app metrics
---

# Configuring Singlestats in a Custom Dashboard

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

[![](/mulesoft/current/en-us/_/img/icons/info.svg)](/monitoring/#billing)

Configure singlestat charts for Mule apps and APIs in an Anypoint Monitoring custom dashboard. A
singlestat chart displays a single value, such as the value of an Inbound - Average Request Count by
Endpoint metric.

![Singlestat chart and configuration view](/mulesoft/current/en-us/monitoring/_images/dashboard-custom-config-singlestat.png)

<table><tbody><tr><td><i data-value="1"></i><b>1</b></td><td>A singlestat chart example<div><p>You can customize the look of singlestats.</p></div></td></tr><tr><td><i data-value="2"></i><b>2</b></td><td>Singlestat configuration tabs:<div><ul><li><p><a href="#general"><strong>General</strong></a>: Singlestat title, description, and mode (basic or advanced)</p></li><li><p><a href="#time-range"><strong>Time range</strong></a>: Override settings for relative time ranges selected from the dashboard UI by end users</p></li><li><p><a href="#options"><strong>Options</strong></a>: Style settings</p></li><li><p><a href="#value-mappings"><strong>Value Mappings</strong></a>: Human-readable label settings</p></li><li><p><strong>X</strong> for closing the edit view</p></li></ul></div></td></tr><tr><td><i data-value="3"></i><b>3</b></td><td><strong>Advanced Mode</strong>: Switch for enabling <a href="#mode_advanced">advanced</a> configurations</td></tr></tbody></table>

## Create a Singlestat Chart

Create a singlestat chart in a custom dashboard by following the guidance in
[Add Charts to a Custom Dashboard](https://docs.mulesoft.com/monitoring/dashboard-custom-config#charts_adding).

## Configure a Singlestat Chart

Configure a singlestat chart in a custom dashboard.

1.  From **Custom Dashboards**, open the custom dashboard that contains your singlestat chart.

    For guidance, see [View a Custom Dashboard](https://docs.mulesoft.com/monitoring/dashboard-custom-config#view).

2.  Click the singlestat’s ![](/mulesoft/current/en-us/monitoring/_images/more-menu-vert-ellipsis.png) (**More menu**), and select
    **Configure**.

3.  Click the singlestat’s **General** configuration tab.

    1.  Provide a title and description.

    2.  Select and configure a singlestat mode (basic or advanced).

        Both modes require environment, resource (app or API), and metric settings. For more
        information, see [General Settings for Basic and Advanced Queries](#general).

4.  Optionally:

    1.  In the singlestat’s [**Time range**](#time-range) tab, set the singlestat’s overrides for
        the time range selected by users.

    2.  In the [**Options**](#options) tab, configure singlestat fonts, coloring, spark lines, and
        other style settings.

    3.  In the [**Value Mappings**](#value-mappings) tab, provide a human-readable label for a
        summary statistic.

5.  Click **Apply Changes**.

6.  Exit the configuration view by clicking the **X** next to the configuration tabs.

## General Settings for Basic and Advanced Queries

**General** tab settings include [basic](#mode_basic) and [advanced](#mode_advanced) modes (or
queries) for configuring time-series data. Both configurations share fields for the title and a
short description.

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Basic and Advanced Mode Settings</th></tr></thead><tbody><tr><td><p><strong>Title</strong></p></td><td><p>Title to display in the UI. Defaults to Panel Title.</p></td></tr><tr><td><p><strong>Description</strong></p></td><td><p>Short description to display in the UI when users hover over the information (<code>i</code>) bubble.</p></td></tr></tbody></table>

Other settings are specific to the setting mode (basic or advanced).

### Basic Mode

In the **General** configuration tab, a basic query selects a single metric for a deployed Mule app
or API in a given environment.

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Basic Mode Settings</th></tr></thead><tbody><tr><td><p><strong>Panel Type</strong></p></td><td><div><div><p>From the drop-down menu, select the type of panel to display for the resource (<strong>Application Panel</strong> or <strong>API Panel</strong>)</p></div></div></td></tr><tr><td><p><strong>Metric</strong></p></td><td><div><div><p>The drop-down menu includes these types of metrics:</p></div><div><ul><li><p>Inbound response metrics and averages</p></li><li><p>JVM metrics</p></li><li><p>Outbound response metrics and averages</p></li></ul></div><div><p>For a list of basic metrics, see <a href="https://docs.mulesoft.com/monitoring/dashboard-config-ref#metrics">Basic Mode Metrics</a></p></div></div></td></tr><tr><td><p><strong>Environment</strong></p></td><td><p>The environment where your application or API is deployed.</p></td></tr><tr><td><p><strong>Resource</strong></p></td><td><p>A deployed application.</p><p>This option is available if you select <strong>Application Panel</strong> as your panel type.</p></td></tr><tr><td><p><strong>API</strong></p></td><td><p>A deployed API.</p><p>This option is available if you select <strong>API Panel</strong> as your panel type.</p></td></tr><tr><td><p><strong>Version / Instance</strong></p></td><td><p>The Mule version or instance on which your API is deployed.</p><p>This option is available if you select <strong>API Panel</strong> as your panel type.</p></td></tr></tbody></table>

> [!NOTE] When you create an application panel using a JVM metric, the query that supports the panel
> uses only the worker-id for the app. When you modify the panel at a later time, the resource
> fields are populated with the query content. Because some apps share a worker-id, the resource
> that appears in the selector might appear to be a different resource from the resource you
> selected originally. However, all resources share the same worker, so the query has the correct
> information despite the selector displaying a different resource name.

### Advanced Mode

In the **General** configuration tab, advanced mode settings support fine-tuned queries for metrics.

> [!IMPORTANT] If you switch back to basic mode, some advanced configuration queries are removed.

![Advanced configuration mode is on.](/mulesoft/current/en-us/monitoring/_images/config-general-advanced.png)

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Advanced Mode Settings for Applications</th></tr></thead><tbody><tr><td><p><strong>From</strong></p></td><td><div><div><p>Lists metrics, such as <code>jvm.memory</code> and <code>app_inbound_metric</code>, that you can add to your chart.</p></div><div><p>This field provides matching suggestions when you type in a character. For example, <code>jvm.c</code> will produce a list of all values that contain those characters (such as <code>jvm.classloading</code> and <code>jvm.cpu.operatingsystem</code>).</p></div><div><p>For a list of advanced metrics, see <a href="https://docs.mulesoft.com/monitoring/dashboard-config-ref#metrics_advanced">Advanced Mode Metrics</a></p></div></div></td></tr><tr><td><p><strong>Where</strong></p></td><td><div><div><p>Supports conditional logic for filtering the <strong>From</strong> metric you selected.</p></div><div><ul><li><p>Select one or more filters tags (such as <code>app_id</code>, <code>env_id</code>, <code>org_id</code>, <code>worker_id</code>). To avoid errors, you must provide required properties, such as the app or API, environment, and API version.</p></li><li><p>Available operators include:<br></p><div><ul><li><p><code>=</code> The value on the left matches the value on the right.</p></li><li><p><code>&lt;</code> The value on the left is less than the value on the right.</p></li><li><p><code>&gt;</code> The value on the left is greater than the value on the right.</p></li></ul></div></li><li><p>You can also construct a query that contains multiple filtering expressions by using logical <code>AND</code> or <code>OR</code> operators between the expressions.</p><div><p>Example:</p></div></li><li><p><code>Where env_id = Sandbox</code></p></li><li><p><code>Where env_id = Sandbox AND app_id= app3</code></p></li><li><p><code>Where env_id = Sandbox OR env_id = Production</code></p></li></ul></div><div><p>Grouping <code>AND</code> or <code>OR</code> conditions within parentheses is <em>not allowed</em>. For example, <code>Where env_id = Sandbox AND (app_id= app3 OR app_id=app2)</code> isn’t allowed.</p></div></div></td></tr><tr><td><p><strong>Select</strong></p></td><td><div><div><p>Add one or more metric <code>field</code> settings to create a function that selects a field from the selected metric value in <strong>From</strong> and applies an operation to it (such as the <code>mean</code> of the <code>heap_total</code>).</p></div></div></td></tr><tr><td><p><strong>Group By</strong></p></td><td><div><div><p>For grouping the data by a selected time interval (such as <code>$_interval</code>, <code>1s</code>, <code>10m</code>, <code>1h</code>), filter tag (such as <code>tag(env_id)</code>), and fill options (such as <code>none</code>, <code>null</code>, <code>0</code>, <code>previous</code>, <code>linear</code>).</p></div><div><p>Valid values and arguments:</p></div><div><ul><li><p><code>time($_interval)</code> for the automated time interval setting, or you can specify time intervals of <code>1m</code>, <code>5m</code>, <code>10m</code>, <code>15m</code>, or <code>1h</code>.</p><div><ul><li><p>To avoid service timeouts when querying over long time ranges, consider using a time interval setting.</p></li></ul></div></li><li><p><code>fill()</code> where valid values are <code>none</code>, <code>null</code>, <code>0</code>, <code>previous</code>, <code>linear</code>.</p></li><li><p><code>LIMIT</code>: Numeric value (N) used to limit the result to the first N data points (combined series and timestamp values) returned by a query.</p></li><li><p><code>SLIMIT</code>: Numeric value (N) used to return all data points (combined series and timestamp values) from the first N series returned by the query.</p></li><li><p><code>ORDER BY time DESC</code>: Returns results in descending time order.</p></li></ul></div></div></td></tr><tr><td><p><strong>Alias By</strong></p></td><td><p>You can create a label for your metric using a literal string (such as <code>my string</code>) or supported variables (for example, <code>$tag_worker_id</code> or <code>$tag_env_id</code>).</p></td></tr></tbody></table>

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Advanced Mode Settings for APIs</th></tr></thead><tbody><tr><td><p><strong>From</strong></p></td><td><div><div><p>Lists metrics, such as <code>http_summary_metric</code>, that you can add to your chart.</p></div><div><p>For a list of advanced metrics, see <a href="https://docs.mulesoft.com/monitoring/dashboard-config-ref#metrics_advanced">Advanced Mode Metrics</a></p></div></div></td></tr><tr><td><p><strong>Where</strong></p></td><td><div><div><p>Provides conditional logic for filtering the metric selected from the <strong>From</strong> field.</p></div><div><p>You can select one or more filter tags (such as <code>api_id</code>, <code>org_id</code>, <code>api_version_id</code>, <code>method</code>, <code>status code</code>). Example: <code>Where status_code = 200</code>.</p></div></div></td></tr><tr><td><p><strong>Select</strong></p></td><td><div><div><p>For creating a function that selects a metric field (such as <code>request_size_average</code>,<code>response_time_max</code>, or <code>response_time_sum</code>) from the metric selected in the <strong>From</strong> field and applies an operation to it (such as the <code>mean</code> of the <code>response_time_average</code>). You can add one or more metric <code>field</code> settings.</p></div></div></td></tr><tr><td><p><strong>Group by</strong></p></td><td><div><div><p>For grouping the data by a selected time interval (such as <code>$_interval</code>, <code>1s</code>, <code>10m</code>, <code>1h</code>), filter tag (such as <code>tag(api_id)</code>), and fill options (such as <code>none</code>, <code>null</code>, <code>0</code>, <code>previous</code>, <code>linear</code>).</p></div><div><ul><li><p>To avoid service timeouts when querying over long time ranges, consider using a time interval setting.</p></li></ul></div></div></td></tr><tr><td><p><strong>Alias by</strong></p></td><td><div><div><p>You can create a label for your metric using a literal string (such as <code>my string</code>) or supported variables (for example, <code>$tag_api_id</code>). The alias must always begin with <code>$tag</code>. The syntax is <code>$tag_yourTagName</code>.</p></div><div><p>To use your tag as an alias, the tag must be included in the <code>group by</code> field of the query.</p></div></div></td></tr></tbody></table>

## Time Range (Overrides, Time Shifts, Info Display)

Time range configurations provide a way to override _relative_ time ranges (such as the last 30
minutes) selected from the dashboard UI by end users.

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Time Range Settings</th></tr></thead><tbody><tr><td><p><strong>Override Relative Time</strong></p></td><td><p>The amount of time covered by the statistic, for example, the last hour (<code>1h</code>) or last thirty minutes (<code>30m</code>). This setting overrides only <em>relative</em> time ranges selected by end users. When a user selects an <em>absolute time and date range</em> for the dashboard, the override is disabled.</p></td></tr><tr><td><p><strong>Add Time Shift</strong></p></td><td><p>How long ago the covered time range ended, for example, <code>1s</code> for one second ago.</p></td></tr><tr><td><p><strong>Hide Time Override Info</strong></p></td><td><p>Hides information about the override time range settings from the singlestat or table, such as <code>30 minutes, ending 1 second ago</code>.</p></td></tr></tbody></table>

## Options Tab

The **Options** tab includes settings for singlestat [values](#value_singlestat), fonts,
[coloring](#color_singlestat), [spark lines](#spark_singlestat), and [gauge icon](#gauge_singlestat)
settings.

### Value Settings for Singlestats

Configure values for your singlestat. Value settings include the type of value you want (such as an
average), the unit of measure, and others.

![Singlestat options example](/mulesoft/current/en-us/monitoring/_images/singlestat-config-options.png)

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Values</th></tr></thead><tbody><tr><td><p><strong>Stat</strong></p></td><td><div><div><p>The value displayed by the singlestat. Available Settings:</p></div><div><ul><li><p><strong>Min</strong>: Minimum of recorded values for the specified metric.</p></li><li><p><strong>Max</strong>: Maximum of recorded values for the specified metric.</p></li><li><p><strong>Average</strong>: Average of the recorded values for the specified metric.</p></li><li><p><strong>Current</strong>: The current value for the specified metric.</p></li><li><p><strong>Total</strong>: Sum of recorded values for the specified metric.</p></li><li><p><strong>Name</strong>: Name of the metric (for example, <code>worker-0</code>).</p></li><li><p><strong>First</strong>: The first recorded value for the specified metric.</p></li><li><p><strong>Delta</strong>: The total incremental increase in the series.</p></li><li><p><strong>Difference</strong>: The difference between the Current value (last value) and the First value.</p></li><li><p><strong>Range</strong>: The difference between Min and Max.</p></li><li><p><strong>Time of Last Point</strong>: Timestamp of the last reading.</p></li></ul></div></div></td></tr><tr><td><p><strong>Prefix</strong></p></td><td><p>Prepends text to the singlestat value.</p></td></tr><tr><td><p><strong>Postfix</strong></p></td><td><p>Appends text to the singlestat value.</p></td></tr><tr><td><p><strong>Unit</strong></p></td><td><p>Unit of measurement to display with the singlestat value (for example, <code>percent (0-100)</code>).</p></td></tr><tr><td><p><strong>Decimals</strong></p></td><td><p>Overrides the automatic decimal precision for the legend and tooltips.</p></td></tr><tr><td><p><strong>Font size</strong></p></td><td><p>Select the font size for the stat, prefix, and postfix.</p></td></tr></tbody></table>

### Coloring and Thresholds

Add color-coded thresholds to a singlestat so that you can see whether it exceeds or stays within
expected limits.

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Coloring</th></tr></thead><tbody><tr><td><p><strong>Background</strong></p></td><td><p>Adds a background color determined by the <strong>Thresholds</strong> setting.</p></td></tr><tr><td><p>Value</p></td><td><p>Applies a color for the current singlestat value that matches the color determined by the <strong>Thresholds</strong> setting.</p></td></tr><tr><td><p><strong>Thresholds</strong></p></td><td><p>Sets a threshold using a numeric range such as <code>10,20</code> to distinguish values between the two numbers, below left-most number, and above the right-most number.</p></td></tr><tr><td><p><strong>Colors</strong></p></td><td><p>Sets the colors for the values that are below, within, or above the <strong>Thresholds</strong> settings. You can invert the colors, as needed.</p></td></tr></tbody></table>

### Spark Lines

Configure spark line settings to show a visual representation of the data.

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Spark Lines</th></tr></thead><tbody><tr><td><p><strong>Show</strong></p></td><td><p>Checkbox to show or hide the spark line.</p></td></tr><tr><td><p><strong>Full Height</strong></p></td><td><p>For covering the full height of the singlestat.</p></td></tr><tr><td><p><strong>Line Color</strong></p></td><td><p>For selecting the color of the spark line.</p></td></tr><tr><td><p><strong>Fill Color</strong></p></td><td><p>For selecting the color of the area below the spark line.</p></td></tr></tbody></table>

### Gauge

Display an arc-like gauge that represents the value of the singlestat.

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Gauge</th></tr></thead><tbody><tr><td><p><strong>Show</strong></p></td><td><p>Checkbox for showing or hiding the gauge.</p></td></tr><tr><td><p><strong>Min</strong></p></td><td><p>Sets a minimum value (such as <code>0</code> for a gauge that shows a percentage).</p></td></tr><tr><td><p><strong>Max</strong></p></td><td><p>Sets a maximum value (such as <code>100</code> for a gauge that shows a percentage).</p></td></tr><tr><td><p><strong>Threshold Labels</strong></p></td><td><p>Checkbox for showing or hiding your Threshold settings.</p></td></tr></tbody></table>

## Value Mappings

From the **Value Mappings** configuration tab, you can provide a human-readable label for a summary
statistic.

![Value mapping example](/mulesoft/current/en-us/monitoring/_images/singlestat-config-value-mapping.png)

<table><colgroup><col> <col></colgroup><thead><tr><th colspan="2">Range to Text Settings</th></tr></thead><tbody><tr><td><p><strong>Value to Text</strong></p></td><td><p>Maps a number to a textual description, for example: <code>0</code> → <code>Error</code>, <code>1</code> → <code>Success</code></p></td></tr><tr><td><p><strong>Range to Text</strong></p></td><td><p>Maps a numeric range to a textual description, for example: From <code>5</code> To <code>10</code> Text <code>Warning</code></p></td></tr></tbody></table>
