Check Output
If display values are enabled for a check, this will include the output value and type.
{
"value": 42,
"type": "custom",
"custom_options": {
"unit": "widget",
"decimals": 2
}
}
Key |
Type |
Description |
value |
string | number | null |
The raw output value from the check query’s output column. When displayed in the UI, formatting will be applied to this value based on the type. The raw value is passed so aggregations like averages can be performed when grouping entities together by domain, team, etc. |
type |
string |
The type of the output, which defines how the output values should be formatted when displayed. Displayed as “format” in the check query editor UI. |
custom_options |
Custom Output Options |
Configuration options when using custom formatting. (Only present for custom output type.) |
Type name |
Type value |
Example formatted value |
Plain text |
string |
Hello, world! |
Number |
number |
123 |
Percentage |
percent |
99.95% |
Currency - USD |
currency_usd |
$1,234.56 |
Duration - Milliseconds |
duration_milliseconds |
5 milliseconds |
Duration - Seconds |
duration_seconds |
5 seconds |
Duration - Minutes |
duration_minutes |
5 minutes |
Duration - Hours |
duration_hours |
5 hours |
Duration - Days |
duration_days |
5 days |
Custom formatting |
custom |
5 widgets |
Key |
Type |
Description |
unit |
string |
The unit to show to the right of the value. Will be pluralized when shown in the UI. For example, a unit of widget will display as 1 widget or 2 widgets. |
decimals |
“auto” | number |
Decimal precision for the value. A string value of “auto” will show the default amount of precision for a number provided by the check’s SQL result set, whether an integer (e.g. 123) or a floating point number (e.g. 0.333333). A numeric value will set fixed precision at that many digits. For example, decimals: 2 will result in formatted values like 1.21 Jigawatts or 2.00 widgets. |