You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-ai/ai/alert.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,16 +168,12 @@ Follow these steps to configure a trigger to alert when `filtered-camera` syncs
168
168
169
169
1. Click **Add Email**.
170
170
171
-
{{<imgprocsrc="/build/configure/trigger-configured-email.png"resize="x600"style="width: 500px"declaredimensions=truealt="The trigger configured with an example email address."class="shadow imgzoom" >}}
172
-
173
171
1. Add the email address you wish to be notified whenever this trigger fires.
174
172
175
173
To add a webhook notification:
176
174
177
175
1. Click **Add Webhook**.
178
176
179
-
{{<imgprocsrc="/build/configure/trigger-configured.png"resize="x600"style="width: 500px"declaredimensions=truealt="The trigger configured with an example webhook URL."class="shadow imgzoom" >}}
180
-
181
177
1. Add the URL of your cloud function.
182
178
1. Write your cloud function to process the [webhook data](/data-ai/reference/triggers-configuration/#webhook-attributes).
183
179
Use your cloud function to process data or interact with external APIs, such as Twilio, PagerDuty, or Zapier.
Copy file name to clipboardExpand all lines: docs/data-ai/data/alert-data.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,6 @@ You can configure triggers to fire in the following scenarios:
26
26
1. Go to the **CONFIGURE** tab of your machine.
27
27
Click the **+** (Create) button in the left side menu and select **Trigger**.
28
28
29
-
{{<imgprocsrc="/build/configure/trigger-create.png"resize="x800"declaredimensions=truealt="The Create menu with Trigger at the bottom of the list of options."style="width: 400px"class="shadow imgzoom" >}}
30
-
31
29
1. Enter a name and click **Create**.
32
30
33
31
1. In the **Type** dropdown, choose one of the following event types:
@@ -57,7 +55,6 @@ You can configure triggers to fire in the following scenarios:
57
55
To add a webhook:
58
56
59
57
1. Click **Add Webhook**.
60
-
{{<imgprocsrc="/build/configure/trigger-configured.png"resize="x800"style="width: 500px"declaredimensions=truealt="A trigger configured with an example URL."class="shadow imgzoom" >}}
61
58
1. Add the URL of your cloud function.
62
59
1. Configure the time between notifications.
63
60
1. Write your cloud function to process the [webhook](/data-ai/reference/triggers-configuration/#webhook-attributes).
@@ -67,7 +64,6 @@ You can configure triggers to fire in the following scenarios:
67
64
To add an email notification:
68
65
69
66
1. Click **Add Email**.
70
-
{{<imgprocsrc="/build/configure/trigger-configured-email.png"resize="x800"style="width: 500px"declaredimensions=truealt="A trigger configured with an example email."class="shadow imgzoom" >}}
71
67
1. Add the email address where you wish to be notified whenever this trigger fires.
@@ -108,8 +133,8 @@ Triggers support the following attributes:
108
133
| Name | Type | Required? | Description |
109
134
| ---- | ---- | --------- | ----------- |
110
135
|`name`| string |**Required**| The name of the trigger |
111
-
|`event`| object |**Required**| The trigger event object, which contains the following fields: <ul><li>`type`: The type of the event to trigger on. Options: <ul><li>`part_data_ingested`: fire when data syncs</li> <li>`conditional_data_ingested`: fire when data that meets a certain condition syncs</li> <li>`part_online`: fire when the part is online</li> <li>`part_offline`: fire when the part is offline</li></ul></li><li>`data_types`: Required with `type``part_data_ingested`. An array of data types that trigger the event. Options: `binary`, `tabular`, `file`, `unspecified`. </li><li> `conditional`: Required when `type` is `conditional_data_ingested`. For more information about this field, see [Conditional attributes](/data-ai/reference/triggers-configuration/#conditional-attributes). </li></ul> |
112
-
|`notifications`| object |**Required**| The notifications object, which contains the following fields: <ul><li>`type`: The type of the notification. Options: `webhook`, `email`</li><li>`value`: The URL to send the request to or the email address to notify.</li><li>`seconds_between_notifications`: The interval between notifications in seconds.</li></ul> For more information on webhooks, see [Webhook attributes](#webhook-attributes). |
136
+
| `event` | object | **Required** | The trigger event object, which contains the following fields: <ul><li>`type`: The type of the event to trigger on. Options: <ul><li>`part_data_ingested`: fire when data syncs</li> <li>`conditional_data_ingested`: fire when data that meets a certain condition syncs</li> <li>`part_online`: fire when the part is online</li> <li>`part_offline`: fire when the part is offline</li> <li>`conditional_logs_ingested`: check every hour and fire if logs of the specified log level are present</li></ul></li><li>`data_types`: Required with `type` `part_data_ingested`. An array of data types that trigger the event. Options: `binary`, `tabular`, `file`, `unspecified`. </li><li> `conditional`: Required when `type` is `conditional_data_ingested`. For more information about this field, see [Conditional attributes](/data-ai/reference/triggers-configuration/#conditional-attributes). </li><li> `log_levels`: Required when `type` is `conditional_logs_ingested`. An array of log levels. Options: `error`, `warn`, `info`. </li></ul> |
137
+
|`notifications`| object |**Required**| The notifications object, which contains the following fields: <ul><li>`type`: The type of the notification. Options: `webhook`, `email`</li><li>`value`: The URL to send the request to or the email address to notify.</li><li>`seconds_between_notifications`: The interval between notifications in seconds. This field is ignored for event type `conditional_logs_ingested` where the interval is always one hour.</li></ul> For more information on webhooks, see [Webhook attributes](#webhook-attributes). |
113
138
|`notes`| string | Optional | Descriptive text to document the purpose, configuration details, or other important information about this trigger. |
Copy file name to clipboardExpand all lines: docs/manage/troubleshoot/alert.md
+66-11Lines changed: 66 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,10 +23,11 @@ date: "2024-12-07"
23
23
cost: "0"
24
24
---
25
25
26
-
You can configure triggers that alert you when machine telemetry data syncs from your local device to the Viam cloud:
26
+
You can configure triggers that alert you when machine telemetry data syncs from your local device to the Viam cloud or based on log messages:
27
27
28
28
-**Telemetry sync**: Alerts whenever certain telemetry syncs
29
29
-**Conditional telemetry sync**: Alert only when synced telemetry satisfies a condition
30
+
-**Logs**: Alert on error, warning, or info logs appearing on a machine
30
31
31
32
For example, you can configure a trigger to send you a notification when your machine's CPU usage reaches a certain threshold.
32
33
@@ -201,8 +202,6 @@ Use **Builder mode** to create a trigger:
201
202
Go to the **CONFIGURE** tab of your machine.
202
203
Click the **+** (Create) button in the left side menu and select **Trigger**.
203
204
204
-
{{<imgprocsrc="/build/configure/trigger-create.png"resize="x400"declaredimensions=truealt="The Create menu with Trigger at the bottom of the list of options.">}}
205
-
206
205
{{< /tablestep >}}
207
206
{{< tablestep >}}
208
207
**Create the trigger**
@@ -245,14 +244,12 @@ To add a notification method, add an entry to the **Webhooks** or **Email** sub-
245
244
To add an email notification:
246
245
247
246
1. Click **Add Email**.
248
-
{{<imgprocsrc="/build/configure/trigger-configured-email.png"resize="x400"style="width: 500px"declaredimensions=truealt="The trigger configured with an example email."class="shadow" >}}
249
247
1. Add the email you wish to be notified whenever this trigger is triggered.
250
248
1. Configure the time between notifications.
251
249
252
250
To add a webhook notification:
253
251
254
252
1. Click **Add Webhook**.
255
-
{{<imgprocsrc="/build/configure/trigger-configured.png"resize="x400"style="width: 500px"declaredimensions=truealt="The trigger configured with an example URL."class="shadow" >}}
256
253
1. Add the URL of your cloud function.
257
254
1. Configure the time between notifications.
258
255
1. Write your cloud function to process the [webhook](/data-ai/reference/triggers-configuration/#webhook-attributes).
@@ -338,6 +335,70 @@ In the **Data capture** section of your sensor's configuration, toggle the switc
338
335
339
336
Click the **Save** button in the top right corner of the page to save your configuration.
340
337
338
+
## Alert on machine logs
339
+
340
+
{{< tabs >}}
341
+
{{% tab name="Builder mode" %}}
342
+
343
+
1. Go to the **CONFIGURE** tab of your machine.
344
+
Click the **+** (Create) button in the left side menu and select **Trigger**.
345
+
346
+
1. Name the trigger and click **Create**.
347
+
348
+
1. Select **Conditional logs ingestion** as the trigger **Type**.
349
+
350
+
1. Select any number of log levels (**Error**, **Warn**, and **Info**) to alert on.
351
+
352
+
**Once per hour**, Viam issues an alert if maching logs are found.
353
+
354
+
1. To add a notification method, add an entry to the **Webhooks** or **Email** sub-panels:
355
+
356
+
To add an email notification:
357
+
358
+
1. Click **Add Email**.
359
+
1. Add the email you wish to be notified whenever this trigger is triggered.
360
+
1. Configure the time between notifications.
361
+
362
+
To add a webhook notification:
363
+
364
+
1. Click **Add Webhook**.
365
+
1. Add the URL of your cloud function.
366
+
1. Configure the time between notifications.
367
+
1. Write your cloud function to process the [webhook attributes](/data-ai/reference/triggers-configuration/#webhook-attributes).
368
+
Use your cloud function to process data or interact with any external API, including Twilio, PagerDuty, or Zapier.
369
+
370
+
{{% /tab %}}
371
+
{{% tab name="JSON mode" %}}
372
+
373
+
Use the following template in your `components` JSON to configure the top-level `triggers` field:
For more information about triggers, see [Trigger configuration](/data-ai/reference/triggers-configuration/).
401
+
341
402
## Alert on machine status
342
403
343
404
### Part is online
@@ -348,8 +409,6 @@ Click the **Save** button in the top right corner of the page to save your confi
348
409
1. Go to the **CONFIGURE** tab of your machine.
349
410
Click the **+** (Create) button in the left side menu and select **Trigger**.
350
411
351
-
{{<imgprocsrc="/build/configure/trigger-create.png"resize="x400"declaredimensions=truealt="The Create menu with Trigger at the bottom of the list of options."class="shadow">}}
352
-
353
412
2. Name the trigger and click **Create**.
354
413
355
414
3. Select **Part is online** as the trigger **Type**.
@@ -359,14 +418,12 @@ Click the **Save** button in the top right corner of the page to save your confi
359
418
To add an email notification:
360
419
361
420
1. Click **Add Email**.
362
-
{{<imgprocsrc="/build/configure/trigger-configured-email.png"resize="x400"style="width: 500px"declaredimensions=truealt="The trigger configured with an example email."class="shadow" >}}
363
421
1. Add the email you wish to be notified whenever this trigger is triggered.
364
422
1. Configure the time between notifications.
365
423
366
424
To add a webhook notification:
367
425
368
426
1. Click **Add Webhook**.
369
-
{{<imgprocsrc="/build/configure/trigger-configured.png"resize="x400"style="width: 500px"declaredimensions=truealt="The trigger configured with an example URL."class="shadow" >}}
370
427
1. Add the URL of your cloud function.
371
428
1. Configure the time between notifications.
372
429
1. Write your cloud function to process the [webhook attributes](/data-ai/reference/triggers-configuration/#webhook-attributes).
@@ -408,8 +465,6 @@ For more information about triggers, see [Trigger configuration](/data-ai/refere
408
465
1. Go to the **CONFIGURE** tab of your machine.
409
466
Click the **+** (Create) button in the left side menu and select **Trigger**.
410
467
411
-
{{<imgprocsrc="/build/configure/trigger-create.png"resize="x400"declaredimensions=truealt="The Create menu with Trigger at the bottom of the list of options."class="shadow">}}
412
-
413
468
2. Name the trigger and click **Create**.
414
469
415
470
3. Select **Part is offline** as the trigger **Type**.
0 commit comments