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: README.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ Example:
19
19
20
20
```toml
21
21
reminder_interval = "3h"
22
+
alert_on_error = false
22
23
23
24
[alerts]
24
25
[alerts.test-alert-1]
@@ -39,6 +40,7 @@ reminder_interval = "3h"
39
40
dbs = ["my-mysql-db"]
40
41
destinations = ["slacks.my-slack"]
41
42
interval = "1h30m"
43
+
alert_on_error = true
42
44
43
45
44
46
[dbs]
@@ -60,16 +62,17 @@ reminder_interval = "3h"
60
62
61
63
62
64
Configuration is defined in [TOML](https://github.com/toml-lang/toml) format.
63
-
-`reminder_interval` - Default interval for all alerts after which alert will be triggered again. Set to 0 if you don't need reminders. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Examples: "300s", "1.5h" or "2h45m". Default value is 0.
64
-
-`alerts.{alert-name}.reminder_interval` - Same as above, but for individual alert.
65
+
-`reminder_interval` - Optional. Default interval for all alerts after which alert will be triggered again. Set to 0 if you don't need reminders. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Examples: "300s", "1.5h" or "2h45m". Default value is 0.
66
+
-`alert_on_error` - Option. Defines behavior during error encounters (connection errors, sql syntax errors, timeouts etc ). If set to true any error will trigger an alert. If set to false then error will be logged and ignored. Default value is true.
67
+
-`alerts.{alert-name}.reminder_interval` - Optional. Same as above, but for individual alert.
65
68
-`alerts.{alert-name}.query` - Required. SQL query to execute at regular interval.
66
69
-`alerts.{alert-name}.message` - Optional. Message to pass with alert.
67
70
-`alerts.{alert-name}.dbs` - Required. List of database references. Provided query will be executed against each database and trigger an individual alert for each database. All databases must be defined in `dbs` section of the configuration. Example: `["my-postgres-db", "my-mysql-db"]`.
68
-
-`alerts.{alert-name}.destinations` - List of destination references to report the alert. Each destination should be defined in related section. Example: `["slacks.channel-1-webhook", "slacks.channel-2-webhook"]`
69
-
-`alerts.{alert-name}.interval` - An interval between consecutive query execution. For simplicity it does not take in account time required to execute the query. For example if query execution time is 5s and interval is 10s then interval between two consecutive queries will be 15s. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Examples: "300s", "1.5h" or "2h45m"
-`dbs.{db-name}.connection` - Connection string for the database. Documentation for databases: [postgres](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING), [mysql](https://github.com/go-sql-driver/mysql#dsn-data-source-name).
72
-
-`slacks.{destination-name}.webhook_url` - Webhook URL for slack integration. More information how to set it up in [official slack documentation](https://api.slack.com/messaging/webhooks).
71
+
-`alerts.{alert-name}.destinations` - Required. List of destination references to report the alert. Each destination should be defined in related section. Example: `["slacks.channel-1-webhook", "slacks.channel-2-webhook"]`
72
+
-`alerts.{alert-name}.interval` - Required. An interval between consecutive query execution. For simplicity it does not take in account time required to execute the query. For example if query execution time is 5s and interval is 10s then interval between two consecutive queries will be 15s. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". Examples: "300s", "1.5h" or "2h45m"
-`dbs.{db-name}.connection` - Required. Connection string for the database. Documentation for databases: [postgres](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING), [mysql](https://github.com/go-sql-driver/mysql#dsn-data-source-name).
75
+
-`slacks.{destination-name}.webhook_url` - Required. Webhook URL for slack integration. More information how to set it up in [official slack documentation](https://api.slack.com/messaging/webhooks).
0 commit comments