Alerting: Update documentation about ValueString
This commit is contained in:
@@ -170,7 +170,7 @@ This example prints the `$value` variable:
|
|||||||
When using multiple data sources, it would display something like this:
|
When using multiple data sources, it would display something like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
[ var='A' labels={instance=instance1} value=81.234, , [ var='B' labels={instance=instance2} value=1 ] ]: CPU usage has exceeded 80% for the last 5 minutes.
|
[ var='A' labels={instance=instance1} type='reduce' value=81.234 ], [ var='B' labels={instance=instance2} type='threshold' value=1 ]: CPU usage has exceeded 80% for the last 5 minutes.
|
||||||
```
|
```
|
||||||
|
|
||||||
But with a single data source, it would display just the value of the query:
|
But with a single data source, it would display just the value of the query:
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ Grafana-managed alerts include these additional properties:
|
|||||||
| `PanelURL` | string | A link to the panel if the alert has a Panel ID annotation, with time range from `1h` before alert start to end (or now if firing). |
|
| `PanelURL` | string | A link to the panel if the alert has a Panel ID annotation, with time range from `1h` before alert start to end (or now if firing). |
|
||||||
| `SilenceURL` | string | A link to silence the alert. |
|
| `SilenceURL` | string | A link to silence the alert. |
|
||||||
| `Values` | [KV](#kv) | The values of expressions used to evaluate the alert condition. Only relevant values are included. |
|
| `Values` | [KV](#kv) | The values of expressions used to evaluate the alert condition. Only relevant values are included. |
|
||||||
| `ValueString` | string | A string that contains the labels and value of each reduced expression in the alert. |
|
| `ValueString` | string | A string containing the labels, expression type, and value of each reduced expression in the alert. |
|
||||||
| `OrgID` | integer | The ID of the organization that owns the alert. |
|
| `OrgID` | integer | The ID of the organization that owns the alert. |
|
||||||
|
|
||||||
This example iterates over the list of firing and resolved alerts (`.Alerts`) in the notification and prints the data for each alert:
|
This example iterates over the list of firing and resolved alerts (`.Alerts`) in the notification and prints the data for each alert:
|
||||||
|
|||||||
@@ -2,17 +2,18 @@
|
|||||||
title: 'JSON alert object'
|
title: 'JSON alert object'
|
||||||
---
|
---
|
||||||
|
|
||||||
| Key | Type | Description |
|
| Key | Type | Description |
|
||||||
| -------------- | ------ | ----------------------------------------------------------------------------------- |
|
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------ |
|
||||||
| `status` | string | Current status of the alert, `firing` or `resolved`. |
|
| `status` | string | Current status of the alert, `firing` or `resolved`. |
|
||||||
| `labels` | object | Labels that are part of this alert, map of string keys to string values. |
|
| `labels` | object | Labels that are part of this alert, map of string keys to string values. |
|
||||||
| `annotations` | object | Annotations that are part of this alert, map of string keys to string values. |
|
| `annotations` | object | Annotations that are part of this alert, map of string keys to string values. |
|
||||||
| `startsAt` | string | Start time of the alert. |
|
| `startsAt` | string | Start time of the alert. |
|
||||||
| `endsAt` | string | End time of the alert, default value when not resolved is `0001-01-01T00:00:00Z`. |
|
| `endsAt` | string | End time of the alert, default value when not resolved is `0001-01-01T00:00:00Z`. |
|
||||||
| `values` | object | Values that triggered the current status. |
|
| `values` | object | Values that triggered the current status. |
|
||||||
| `generatorURL` | string | URL of the alert rule in the Grafana UI. |
|
| `valueString` | string | A string representation of expression values including variable names, labels, expression types, and values. |
|
||||||
| `fingerprint` | string | The labels fingerprint, alarms with the same labels will have the same fingerprint. |
|
| `generatorURL` | string | URL of the alert rule in the Grafana UI. |
|
||||||
| `silenceURL` | string | URL to silence the alert rule in the Grafana UI. |
|
| `fingerprint` | string | The labels fingerprint, alarms with the same labels will have the same fingerprint. |
|
||||||
| `dashboardURL` | string | A link to the Grafana Dashboard if the alert has a Dashboard UID annotation. |
|
| `silenceURL` | string | URL to silence the alert rule in the Grafana UI. |
|
||||||
| `panelURL` | string | A link to the panel if the alert has a Panel ID annotation. |
|
| `dashboardURL` | string | A link to the Grafana Dashboard if the alert has a Dashboard UID annotation. |
|
||||||
| `imageURL` | string | URL of a screenshot of a panel assigned to the rule that created this notification. |
|
| `panelURL` | string | A link to the panel if the alert has a Panel ID annotation. |
|
||||||
|
| `imageURL` | string | URL of a screenshot of a panel assigned to the rule that created this notification. |
|
||||||
|
|||||||
Reference in New Issue
Block a user