Skip to content

Commit 9e6ac65

Browse files
committed
clickstack alerting docs
1 parent edd7565 commit 9e6ac65

File tree

11 files changed

+170
-13
lines changed

11 files changed

+170
-13
lines changed

docs/use-cases/observability/clickstack/alerts.md

Lines changed: 170 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,190 @@ keywords: ['ClickStack', 'observability', 'alerts', 'search-alerts', 'notificati
1111

1212
import Image from '@theme/IdealImage';
1313
import search_alert from '@site/static/images/use-cases/observability/search_alert.png';
14+
import edit_chart_alert from '@site/static/images/use-cases/observability/edit_chart_alert.png';
15+
import add_chart_alert from '@site/static/images/use-cases/observability/add_chart_alert.png';
16+
import create_chart_alert from '@site/static/images/use-cases/observability/create_chart_alert.png';
17+
import alerts_search_view from '@site/static/images/use-cases/observability/alerts_search_view.png';
18+
import add_new_webhook from '@site/static/images/use-cases/observability/add_new_webhook.png';
19+
import add_webhook_dialog from '@site/static/images/use-cases/observability/add_webhook_dialog.png';
20+
import manage_alerts from '@site/static/images/use-cases/observability/manage_alerts.png';
21+
import alerts_view from '@site/static/images/use-cases/observability/alerts_view.png';
22+
import multiple_search_alerts from '@site/static/images/use-cases/observability/multiple_search_alerts.png';
23+
import remove_chart_alert from '@site/static/images/use-cases/observability/remove_chart_alert.png';
1424

15-
## Search alerts {#search-alerts}
25+
## Alerting in ClickStack {#alerting-in-clickstack}
1626

17-
After entering a [search](/use-cases/observability/clickstack/search), you can create an alert to be
18-
notified when the number of events (logs or spans) matching the search exceeds or falls below a threshold.
27+
ClickStack includes built-in support for alerting, enabling teams to detect and respond to issues in real time across logs, metrics, and traces.
1928

20-
### Creating an alert {#creating-an-alert}
29+
Alerts can be created directly in the HyperDX interface and integrate with popular notification systems like Slack and PagerDuty.
2130

22-
You can create an alert by clicking the `Alerts` button on the top right of the `Search` page.
31+
Alerting works seamlessly across your ClickStack data, helping you track system health, catch performance regressions, and monitor key business events.
2332

24-
From here, you can name the alert, as well as set the threshold, duration, and notification method for the alert (Slack, Email, PagerDuty or Slack webhook).
33+
## Types of alerts {#types-of-alerts}
2534

26-
The `grouped by` value allows the search to be subject to an aggregation e.g. `ServiceName`, thus allowing potential multiple alerts to be triggered off the same search.
35+
ClickStack supports two complementary ways to create alerts: **Search alerts** and **Dashboard chart alerts**. Once the alert is created, it is attached to either the search or the chart.
36+
37+
### 1. Search alerts {#search-alerts}
38+
39+
Search alerts allow you to trigger notifications based on the results of a saved search. They help you detect when specific events or patterns occur more (or less) frequently than expected.
40+
41+
An alert is triggered when the count of matching results within a defined time window either exceeds or falls below a specified threshold.
42+
43+
To create a search alert:
44+
45+
<VerticalStepper headerLevel="h4">
46+
47+
For an alert to be created for a search, the search must be saved. Users can either create the alert for an existing saved search or save the search during the alert creation process. In the example below, we assume the search is not saved.
48+
49+
#### Open alert creation dialog {#open-dialog}
50+
51+
Start by entering a [search](/use-cases/observability/clickstack/search) and clicking the `Alerts` button in the top-right corner of the `Search` page.
52+
53+
<Image img={alerts_search_view} alt="Alerts search view" size="lg"/>
54+
55+
#### Create the alert {#create-the-alert}
56+
57+
From the alert creation panel, you can:
58+
59+
- Assign a name to the saved search associated with the alert.
60+
- Set a threshold and specify how many times it must be reached within a given period. Thresholds can also be used as upper or lower bounds. The period here will also dictate how often the alert is triggered.
61+
- Specify a `grouped by` value. This allows the search to be subject to an aggregation, e.g., `ServiceName`, thus allowing multiple alerts to be triggered off the same search.
62+
- Choose a webhook destination for notifications. You can add a new webhook directly from this view. See [Adding a webhook](#add-webhook) for details.
63+
64+
Before saving, ClickStack visualizes the threshold condition so you can confirm it will behave as expected.
2765

2866
<Image img={search_alert} alt="Search alerts" size="lg"/>
2967

30-
### Common alert scenarios {#common-alert-scenarios}
68+
</VerticalStepper>
69+
70+
Note that multiple alerts can be added to a search. If the above process is repeated, users will see the current alerts as tabs at the top of the edit alert dialog, with each alert assigned a number.
71+
72+
<Image img={multiple_search_alerts} alt="Multiple alerts" size="md"/>
73+
74+
### 2. Dashboard chart alerts {#dashboard-alerts}
75+
76+
Dashboard alerts extend alerting to charts.
77+
78+
You can create a chart-based alert directly from a saved dashboard, powered by full SQL aggregations and ClickHouse functions for advanced calculations.
79+
80+
When a metric crosses a defined threshold, an alert triggers automatically, allowing you to monitor KPIs, latencies, or other key metrics over time.
81+
82+
:::note
83+
For an alert to be created for a visualization on a dashboard, the dashboard must be saved.
84+
:::
85+
86+
To add a dashboard alert:
87+
88+
<VerticalStepper headerLevel="h4">
89+
90+
Alerts can be created during the chart creation process, when adding a chart to a dashboard, or added to existing charts. In the example below, we assume the chart already exists on the dashboard.
91+
92+
#### Open the chart edit dialog {#open-chart-dialog}
93+
94+
Open the chart's configuration menu and select the alert button. This will show the chart edit dialog.
95+
96+
<Image img={edit_chart_alert} alt="Edit chart alert" size="lg"/>
97+
98+
#### Add the alert {#add-chart-alert}
99+
100+
Select **Add Alert**.
101+
102+
<Image img={add_chart_alert} alt="Add alert to chart" size="lg"/>
103+
104+
#### Define the alert conditions {#define-alert-conditions}
105+
106+
Define the condition (`>=`, `<`), threshold, duration, and webhook. The duration here will also dictate how often the alert is triggered.
107+
108+
<Image img={create_chart_alert} alt="Create alert for chart" size="lg"/>
109+
110+
You can add a new webhook directly from this view. See [Adding a webhook](#add-webhook) for details.
111+
112+
</VerticalStepper>
113+
114+
## Adding a webhook {#add-webhook}
115+
116+
During alert creation, users can either use an existing webhook or create one. Once created, the webhook will be available for reuse across other alerts.
117+
118+
A webhook can be created for different service types, including Slack and PagerDuty, as well as generic targets.
119+
120+
For example, consider the alert creation for a chart below. Before specifying the webhook, the user can select `Add New Webhook`.
121+
122+
<Image img={add_new_webhook} alt="Add new webhook" size="lg"/>
123+
124+
This opens the webhook creation dialog, where users can create a new webhook:
125+
126+
<Image img={add_webhook_dialog} alt="Webhook creation" size="md"/>
127+
128+
A webhook name is required, while descriptions are optional. Other settings that must be completed depend on the service type.
129+
130+
Note that different service types are available between ClickStack Open Source and ClickStack Cloud. See [Service type integrations](#integrations).
131+
132+
### Service type integrations {#integrations}
133+
134+
ClickStack alerts integrate out of the box with the following service types:
135+
136+
- **Slack**: send notifications directly to a channel via either a webhook or API.
137+
- **PagerDuty**: route incidents for on-call teams via the PagerDuty API.
138+
- **Webhook**: connect alerts to any custom system or workflow via a generic webhook.
139+
140+
:::note ClickHouse Cloud only integrations
141+
The Slack API and PagerDuty integrations are only supported in ClickHouse Cloud.
142+
:::
143+
144+
Depending on the service type, users will need to provide different details. Specifically:
145+
146+
**Slack (Webhook URL)**
147+
148+
- Webhook URL. For example: `https://hooks.slack.com/services/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`. See the [Slack documentation](https://docs.slack.dev/messaging/sending-messages-using-incoming-webhooks/) for further details.
149+
150+
**Slack (API)**
151+
152+
- Slack bot token. See the [Slack documentation](https://docs.slack.dev/authentication/tokens/#bot/) for further details.
153+
154+
**PagerDuty API**
155+
156+
- PagerDuty integration key. See the [PagerDuty documentation](https://support.pagerduty.com/main/docs/api-access-keys) for further details.
157+
158+
**Generic**
159+
160+
- Webhook URL
161+
- Webhook headers (optional)
162+
- Webhook body (optional). The body currently supports the template variables `{{title}}`, `{{body}}`, and `{{link}}`.
163+
164+
## Managing alerts {#managing-alerts}
165+
166+
Alerts can be centrally managed through the alerts panel on the left-hand side of HyperDX.
167+
168+
<Image img={manage_alerts} alt="Manage alerts" size="lg"/>
169+
170+
From this view, users can see all alerts that have been created and are currently running in ClickStack.
171+
172+
<Image img={alerts_view} alt="Alerts view" size="lg"/>
173+
174+
This view also displays the execution status of the alert. A red bar indicates that the alert has fired, while a green bar indicates that the alert executed successfully but did not fire.
175+
176+
In the above example the first alert has fired every time. The second alert fired twice before triggering and not firing.
177+
178+
Clicking an alert takes you to the chart or search the alert is attached to.
179+
180+
### Deleting an alert {#deleting-alerts}
181+
182+
To remove an alert, open the edit dialog for the associated search or chart, then select **Remove Alert**.
183+
In the example below, the `Remove Alert` button will remove the alert from the chart.
184+
185+
<Image img={remove_chart_alert} alt="Remove chart alert" size="lg"/>
186+
187+
## Common alert scenarios {#common-alert-scenarios}
31188

32-
Here are a few common alert scenarios that you can use HyperDX for:
189+
Here are a few common alert scenarios you can use HyperDX for:
33190

34-
**Errors:** We first recommend setting up alerts for the default
191+
**Errors:** We recommend setting up alerts for the default
35192
`All Error Events` and `HTTP Status >= 400` saved searches to be notified when
36-
excess error occurs.
193+
excess errors occur.
37194

38-
**Slow Operations:** You can set up a search for slow operations (ex.
195+
**Slow Operations:** You can set up a search for slow operations (e.g.,
39196
`duration:>5000`) and then alert when there are too many slow operations
40197
occurring.
41198

42199
**User Events:** You can also set up alerts for customer-facing teams to be
43-
notified when new users sign up, or a critical user action is performed.
200+
notified when new users sign up or a critical user action is performed.
861 KB
Loading
724 KB
Loading
102 KB
Loading
997 KB
Loading
348 KB
Loading
657 KB
Loading
1.05 MB
Loading
1010 KB
Loading
133 KB
Loading

0 commit comments

Comments
 (0)