Query Value Widget
Security Monitoring is now available Security Monitoring is now available

Query Value Widget

Query values display the current value of a given metric, APM, or log query. They come with conditional formatting (such as a green/yellow/red background) to convey whether the value is in the expected range. The values displayed by a query value need not represent an instantaneous measurement.

The widget can display the latest value reported, or an aggregate computed from all query values across the time window. These visualizations provide a narrow but unambiguous window into your infrastructure query.

Setup

Configuration

  1. Choose the data to graph:
  2. Choose the units and the formatting.
  3. Optional: configure a conditional format depending on the value displayed.

Options

Global time

On screenboards only, choose whether your widget has a custom timeframe or the screenboard’s global timeframe.

Title

Display a custom title for your widget by activating the Show a Title check box:

Optionally define its size and alignment.

API

The dedicated widget JSON schema definition for the query value widget is:

QUERY_VALUE_SCHEMA = {
    "type": "object",
    "properties": {
        "type": {"enum": ["query_value"]},
        "requests": {
            "type":     "array",
            "items":    REQUEST_SCHEMA,
            "minItems": 1,
            "maxItems": 1
        },
        "autoscale":   {"type": "boolean"},
        "custom_unit": {"type": "string"},
        "precision":   {"type": "integer"},
        "text_align":  {"enum": ["center", "left", "right"]},
        "title":       {"type": "string"}
    },
    "required": ["type", "requests"],
    "additionalProperties": false
}
ParameterTypeRequiredDescription
typestringyesType of widget. For the query value widget use query_value.
requestsarray of objectsyesArray of one request object to display in the widget. See the dedicated Request JSON schema documentation to learn how to build the REQUEST_SCHEMA.
autoscaleBooleannoWhether to use autoscaling or not.
custom_unitstringnoDisplay a unit of your choice on the widget.
precisionintegernoNumber of decimals to show. If not defined, the widget uses the raw value.
text_alignstringnoHow to align the value in the widget; values available are center, left, or right.
titlestringnoTitle of your widget.

Additional properties allowed in the request object:

{
    "conditional_formats": CONDITIONAL_FORMATS_SCHEMA,
    "aggregator": {"enum": ["avg", "last", "max", "min", "sum"]}
}
ParameterTypeRequiredDescription
conditional_formatsobjectnoConditional format control options. See the dedicated Conditional format JSON schema documentation to learn how to build the CONDITIONAL_FORMATS_SCHEMA.
aggregatorenumnoAggregator used for the request; available values are: avg, last, max, min, or sum.

Further Reading

Additional helpful documentation, links, and articles: