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
@@ -9,7 +9,7 @@ You can monitor activity and alert on issues and usage for your PowerSync Cloud
9
9
10
10
***Monitor Service and Replication Activity**: Track your PowerSync Service and replication logs with [Instance Logs](#instance-logs)
11
11
12
-
***Configure Alerts**: Set up alerts for replication issues or usage activity \*
12
+
***Configure Alerts**: Set up alerts for connection or replication issues or usage activity \*
13
13
14
14
* Includes [Issue Alerts](#issue-alerts) and/or [Usage Alerts](#usage-alerts)
15
15
@@ -108,7 +108,7 @@ You can manage logs with the following options:
108
108
109
109
## Issue Alerts
110
110
111
-
Issue alerts capture potential problems with your instance, such as connection or sync issues.
111
+
Issue alerts capture potential problems with your instance, such as connection or replication issues.
112
112
113
113
<Note>
114
114
**Availability**
@@ -118,41 +118,27 @@ Issue alerts capture potential problems with your instance, such as connection o
118
118
119
119
### Configure Issue Alerts
120
120
121
-
<Note>
122
-
Issue alerts configuration is currently available in the [legacy dashboard](https://powersync.journeyapps.com/). This feature will be available in the new dashboard soon.
123
-
</Note>
124
-
125
-
Issue alerts are set up per instance. To set up a new alert, navigate to your **PowerSync Project tree**, right-click on the "Issue Alerts" option under the selected instance, and follow the prompts.
You can set up alerts that trigger under certain conditions:
132
-
133
-
***Connection Issues**: Trigger when there is a connection problem
121
+
Issue alerts are set up per instance. To set up a new alert, navigate to the **Alerts** section in the [PowerSync Dashboard](https://dashboard.powersync.com/) and click **Create Issue Alert**.
134
122
135
-
***Replication/Sync Issues**: Trigger when there is an issue with a replication or sync process
123
+
When creating or editing an issue alert, you can configure:
136
124
137
-
#### Severity Level
125
+
***Alert Name**: Give your alert a descriptive name to help identify it
138
126
139
-
You also have the option to set the severity level of the alerts. For example, you can configure alerts to trigger only for `warning` and/or `fatal` issues. Free and Pro plan customers can only configure `fatal` alerts.
127
+
***Issue Type**: Select the type of issue to monitor from the dropdown:
128
+
***Database Connection Issue**: Trigger when there is a connection problem
129
+
***Replication Issue**: Trigger when there is an issue with the replication process
140
130
141
-
### View Issue Alerts
131
+
***Severity Levels**: Choose which severity levels should trigger this alert:
132
+
***Warning**: For non-critical issues
133
+
***Fatal**: For critical issues that require immediate attention
142
134
143
-
<Note>
144
-
Viewing issue alerts is currently available in the [legacy dashboard](https://powersync.journeyapps.com/). This feature will be available in the new dashboard soon.
145
-
</Note>
146
135
147
-
Once you have created an alert, you can right-click on it to open the alert logs. The logs panel includes the option to filter alerts by date range.
See [Alert Notifications](#alert-notifications) below to be notified when an issue alert is triggered.
140
+
Creating an issue alert only defines *what* to monitor. To actually receive notifications when alerts trigger, you must also set up [Email Rules](#email-notifications) or [Webhooks](#webhooks) and configure them to notify for "Issue alert state change" events. See the [Alert Notifications](#alert-notifications) section below.
141
+
</Warning>
156
142
157
143
## Usage Alerts
158
144
@@ -166,26 +152,14 @@ Usage alerts trigger when specific usage metrics exceed a defined threshold. Thi
166
152
167
153
### Configure Usage Alerts
168
154
169
-
<Note>
170
-
Usage alerts configuration is currently available in the [legacy dashboard](https://powersync.journeyapps.com/). This feature will be available in the new dashboard soon.
171
-
</Note>
155
+
Usage alerts are set up per instance. Navigate to the **Alerts** section in the [PowerSync Dashboard](https://dashboard.powersync.com/) and click **Create Usage Alert**.
172
156
173
-
Usage alerts are set up per instance. Navigate to your **PowerSync Project** tree, and click on the plus icon for the **Usage Alerts** option under your selected instance to create a new alert.
When creating or editing a usage alert, you can configure:
184
159
185
-
***Alert Name**: A descriptive name for your alert to help identify it
160
+
***Alert Name**: Give your alert a descriptive name to help identify it
186
161
187
162
***Metric**: Select from the following usage metrics to monitor:
188
-
189
163
* Data Synced
190
164
* Data Replicated
191
165
* Operations Synced
@@ -197,141 +171,94 @@ Usage alerts have the following configuration options:
197
171
These metrics correspond to the data shown in the [Usage Metrics](#view-usage-metrics) workspace and align with the PowerSync Service parameters outlined in our [pricing](https://www.powersync.com/pricing).
198
172
</Note>
199
173
200
-
***Window (minutes)**: The number of minutes to look back when evaluating usage. All usage data points within this time window are included when determining if the configured threshold has been crossed
174
+
***Window**: The number of minutes to look back when evaluating usage. All usage data points within this time window are included when determining if the configured threshold has been crossed
201
175
202
-
***Calculation**: Choose how to aggregate all data points within the window before comparing to the threshold:
176
+
***Aggregation**: Choose how to aggregate all data points within the window before comparing to the threshold:
177
+
***Avg**: Calculate the average of all values
178
+
***Max**: Use the highest value
179
+
***Min**: Use the lowest value
203
180
204
-
***Average over window**: Calculate the average of all values
205
-
***Max over window**: Use the highest value
206
-
***Min over window**: Use the lowest value
181
+
***Condition**: Set whether the alert triggers when usage goes **Above** or **Below** the specified threshold
207
182
208
-
***Threshold Condition**: Set whether the alert triggers when usage goes **Above** or **Below** the specified value
183
+
***Threshold Value**: The numeric limit for the selected metric (in bytes for size-based metrics; count for all other metrics)
209
184
210
-
***Threshold Value**: The numeric limit for the selected metric (in bytes for size-based metrics; count for all others)
211
185
212
-
### View Usage Alert Logs
186
+
<Warning>
187
+
**Important: Set Up Notification Rules**
213
188
214
-
<Note>
215
-
Viewing usage alert logs is currently available in the [legacy dashboard](https://powersync.journeyapps.com/). This feature will be available in the new dashboard soon.
216
-
</Note>
217
-
218
-
Once you have created an alert, you can right-click on it to open the alert logs. The logs panel includes the option to filter alerts by date range.
See [Alert Notifications](#alert-notifications) below to be notified when a usage alert is triggered.
189
+
Creating a usage alert only defines *what* to monitor. To actually receive notifications when alerts trigger, you must also set up [Email Rules](#email-notifications) or [Webhooks](#webhooks) and configure them to notify for "Usage alert state change" events. See the [Alert Notifications](#alert-notifications) section below.
190
+
</Warning>
226
191
227
192
## Alert Notifications
228
193
229
-
You can set up notifications to be informed of issue or metric alerts, as well as deploy state changes. PowerSync provides multiple notification methods that trigger both when an alert becomes active and when it returns to normal (indicating the monitored conditions are back within acceptable thresholds).
194
+
Set up notification rules to be informed of issue or usage alerts, as well as deploy state changes. PowerSync provides multiple notification methods that trigger both when an alert becomes active and when it returns to normal (indicating the monitored conditions are back within acceptable thresholds).
230
195
231
-
***Email Notifications**: Send alerts directly to your email address
196
+
***Email Rules**: Send alerts directly to your email address
232
197
***Webhooks**: Notify external systems and services
233
198
234
199
<Note>
235
200
**Availability**
236
201
237
-
***Email notifications**: Available on all plans (**Free**, **Pro**, **Team** and **Enterprise**)
202
+
***Email Rules**: Available on all plans (**Free**, **Pro**, **Team** and **Enterprise**)
238
203
239
204
***Webhooks**: Available on **Pro**, **Team** and **Enterprise** plans
240
205
</Note>
241
206
242
-
### Email Notifications
207
+
### Email Rules
243
208
244
-
Email notifications allow you to receive alerts directly to your email address when specific events occur in PowerSync.
209
+
Email rules allow you to receive alerts directly to your email address when specific events occur in PowerSync.
245
210
246
-
#### Set Up Email Notifications
211
+
#### Set Up Email Rules
247
212
248
-
<Note>
249
-
Email rules configuration is currently available in the [legacy dashboard](https://powersync.journeyapps.com/). This feature will be available in the new dashboard soon.
250
-
</Note>
213
+
Navigate to the **Alerts** section in the [PowerSync Dashboard](https://dashboard.powersync.com/) and scroll down to the **Notification Rules** section. Click **Create Email Rule** to set up email notifications.
251
214
252
-
Navigate to the **Email Rules** section in your **PowerSync Project** tree, and click on the plus icon to create a new email rule for your project.
253
-
254
-
<Info>
215
+
<Warning>
255
216
Accounts on the Free plan are restricted to a single email rule; customers on paid plans can create an unlimited number of email rules.
When creating or editing an email rule, you can configure:
263
220
264
-
***Email Address**: Specify the email address that will receive the notifications
221
+
***Recipient Email**: Specify the email address that will receive the notifications (required)
265
222
266
223
***Event Triggers**: Select one or more of the following events to trigger the email notification:
224
+
***Usage alert state change**: Fired when a usage alert changes between 'monitoring' and 'alerting' (a threshold has been crossed)
225
+
***Issue alert state change**: Fired when an issue alert changes between 'monitoring' and 'alerting' (the instance has active issues)
226
+
***Deploy state change**: Fired when an instance deploy starts, completes or fails. This includes deprovisioning an instance
267
227
268
-
* Issue alert state change
269
-
270
-
* Usage alert state change (Team & Enterprise plan only)
271
-
272
-
* Deploy state change
228
+
***Enabled**: Toggle to control whether the email rule is active
273
229
274
-
***Enable/Disable**: Control whether the email rule is active
275
230
276
231
### Webhooks
277
232
278
233
Webhooks enable you to notify external systems when specific events occur in PowerSync.
279
234
280
235
#### Set Up Webhooks
281
236
282
-
<Note>
283
-
Webhook configuration is currently available in the [legacy dashboard](https://powersync.journeyapps.com/). This feature will be available in the new dashboard soon.
284
-
</Note>
237
+
Navigate to the **Alerts** section in the [PowerSync Dashboard](https://dashboard.powersync.com/) and scroll down to the **Notification Rules** section. Click **Create Webhook Rule** to set up webhook notifications.
285
238
286
-
Navigate to the **Webhooks** section in your **PowerSync Project** tree, and click on the plus icon to create a new webhook for your project.
239
+
When creating or editing a webhook rule, you can configure:
***Specify Webhook Endpoint**: Define the endpoint that will receive the webhook request (starting with `https://`).
241
+
***Webhook Endpoint (URL)**: Define the endpoint that will receive the webhook request (starting with `https://`) (required)
295
242
296
243
***Event Triggers**: Select one or more of the following events to trigger the webhook:
244
+
***Usage alert state change**: Fired when a usage alert changes between 'monitoring' and 'alerting' (a threshold has been crossed)
245
+
***Issue alert state change**: Fired when an issue alert changes between 'monitoring' and 'alerting' (the instance has active issues)
246
+
***Deploy state change**: Fired when an instance deploy starts, completes or fails. This includes deprovisioning an instance
297
247
298
-
* Issue alert state change
299
-
300
-
* Usage alert state change (Team & Enterprise plan only)
248
+
***Enabled**: Toggle to control whether the webhook rule is active
301
249
302
-
* Deploy state change
250
+
***Retries**: Configure the number of retry attempts for failed webhook deliveries
303
251
304
-
You can control how webhooks operate:
305
252
306
-
* Enable, disable, or pause a webhook
253
+
<Check>
254
+
After creating a webhook, a secret is automatically generated and copied to your clipboard. Store this secret since you'll need it to verify the webhook request signature.
255
+
</Check>
307
256
308
-
* If paused, invocations can still be generated and queued, but they won't be processed
309
-
310
-
* If disabled, invocations won't be generated
311
-
312
-
* Choose sequential or concurrent execution
313
-
314
-
* If concurrent, you can set the maximum number of concurrent invocations
315
-
316
-
* Configure retry attempts for failed webhook deliveries
317
-
318
-
#### Webhook Secret
319
-
320
-
After creating a webhook, a secret is automatically generated and copied to your clipboard. Store this secret since you'll need it to verify the webhook request signature. See [Webhook Signature Verification](#webhook-signature-verification)
321
-
322
-
#### Test Webhooks
323
-
324
-
A test webhook can be sent to your specified endpoint to verify your setup. Right-click on a webhook in the **PowerSync project** tree and select the **Test Webhook** option:
Every webhook request contains an `x-journey-signature` header, which is a base64-encoded HMAC (Hash-based Message Authentication Code). To verify the request, you need to compute the HMAC using the shared secret that was generated when you created the webhook, and compare it to the value in the `x-journey-signature` header.
333
260
334
-
**JavaScript Example**
261
+
**JavaScript Example:**
335
262
336
263
```javascript
337
264
import { createHmac } from'crypto';
@@ -352,10 +279,3 @@ if (signature === verify) {
352
279
}
353
280
```
354
281
355
-
#### Regenerate Secret
356
-
357
-
You can regenerate the secret used to validate the webhook signature. Right-click on a webhook in the PowerSync project tree and select the **Regenerate secret** option.
358
-
359
-
#### View Webhook Invocation Logs
360
-
361
-
You can review webhook invocation logs in the Dashboard and filter them by date. Right-click on a webhook in the **PowerSync project** tree and select the **View webhook invocation logs** option.
0 commit comments