Skip to content

Commit 755d820

Browse files
authored
Merge branch 'main' into paula/add-pr-template
2 parents c2462e2 + a0c7ab5 commit 755d820

2 files changed

Lines changed: 92 additions & 102 deletions

File tree

integrations/alerts/slack.mdx

Lines changed: 91 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 'Sending Alerts to Slack'
3-
description: 'Configure Slack integration to receive real-time alerts from Checkly monitors'
3+
description: 'Configure Slack integration to receive real-time alerts from Checkly'
44
sidebarTitle: 'Slack'
55
---
66

@@ -19,9 +19,9 @@ You have the option to customize the default channel you've set in Slack by sett
1919

2020
By customizing the channel name, alerting options & checks for that alert channel, you can use a single Incoming WebHook URL for multiple scenarios.
2121

22-
<Callout type="warning">
22+
<Warning>
2323
If you're using a free Slack workspace, be aware of [message limits](https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces). Exceeding these limits may prevent new alerts from being delivered.
24-
</Callout>
24+
</Warning>
2525

2626
## Example Failed Slack Alert
2727

@@ -37,7 +37,7 @@ From the recovered Slack message, you can see the timestamp as well as a link to
3737

3838
## Custom Slack Webhook Integration
3939

40-
For users who need more control over the Slack alert format and content, you can use a **Webhook Alert Channel** in Checkly to send fully customized messages to Slack.
40+
For users who need more control over the Slack alert format and content, you can use a [Webhook Alert Channel](/integrations/alerts/webhooks) in Checkly to send fully customized messages to Slack.
4141

4242
This approach is ideal when the native Slack integration does not meet your formatting or dynamic content needs. You will be using a Webhook alert channel with a Slack Incoming WebHook URL and a custom payload template. This setup allows you to control Slack message formatting using Slack's [Block Kit](https://api.slack.com/block-kit).
4343

@@ -100,56 +100,113 @@ The following template uses conditional logic (`{{#if}}`) to change the message
100100
{{/if}}
101101
{
102102
"type": "mrkdwn",
103-
"text": "*Status:*\n{{ALERT_TYPE}}"
103+
"text": "*Type:*\n{{CHECK_TYPE}}"
104104
},
105105
{
106106
"type": "mrkdwn",
107-
"text": "*Location:*\n{{LOCATION}}"
108-
}
109-
]
110-
},
111-
{
112-
"type": "section",
113-
"fields": [
107+
"text": "*Started at:*\n{{STARTED_AT}}"
108+
},
114109
{
115110
"type": "mrkdwn",
116-
"text": "*Response Time:*\n{{RESPONSE_TIME}}ms"
111+
"text": "*Run Location:*\n`{{RUN_LOCATION}}`"
117112
},
118113
{
119114
"type": "mrkdwn",
120-
"text": "*Timestamp:*\n{{TIMESTAMP}}"
115+
"text": "*Response Time:*\n{{RESPONSE_TIME}}ms"
116+
}
117+
{{#if API_CHECK_RESPONSE_STATUS_CODE}},
118+
{
119+
"type": "mrkdwn",
120+
"text": "*Status Code:*\n{{API_CHECK_RESPONSE_STATUS_CODE}} {{API_CHECK_RESPONSE_STATUS_TEXT}}"
121121
}
122+
{{/if}}
122123
]
123124
},
124-
{{#if (eq ALERT_TYPE "ALERT_FAILURE")}}
125+
{{#if CHECK_ERROR_MESSAGE}}
125126
{
126127
"type": "section",
127128
"text": {
128129
"type": "mrkdwn",
129-
"text": "*Error Details:*\n{{ERROR_MESSAGE}}"
130+
"text": "*Error Message:*\n```{{CHECK_ERROR_MESSAGE}}```"
130131
}
131132
},
132133
{{/if}}
134+
135+
{{#if (eq ALERT_TYPE "ALERT_RECOVERY")}}
136+
{
137+
"type": "section",
138+
"text": {
139+
"type": "mrkdwn",
140+
"text": "✅ *This check has recovered and is now passing successfully.*"
141+
}
142+
},
143+
{{/if}}
144+
145+
{{#if (eq ALERT_TYPE "ALERT_DEGRADED_RECOVERY")}}
146+
{
147+
"type": "section",
148+
"text": {
149+
"type": "mrkdwn",
150+
"text": "🟡 *This check has recovered from a degraded state.*"
151+
}
152+
},
153+
{{/if}}
154+
155+
{{#if (eq ALERT_TYPE "ALERT_DEGRADED")}}
156+
{
157+
"type": "section",
158+
"text": {
159+
"type": "mrkdwn",
160+
"text": "⚠️ *This check is running but performance is degraded.*"
161+
}
162+
},
163+
{{/if}}
164+
165+
{
166+
"type": "section",
167+
"text": {
168+
"type": "mrkdwn",
169+
"text": "🔎 *View full result:*\n<{{RESULT_LINK}}|Click here to view details in Checkly>"
170+
}
171+
},
133172
{
134173
"type": "actions",
135174
"elements": [
136175
{
137176
"type": "button",
138177
"text": {
139178
"type": "plain_text",
140-
"text": "View Check",
179+
"text": "Runbook",
141180
"emoji": true
142181
},
143-
"url": "https://app.checklyhq.com/checks/{{CHECK_ID}}"
182+
{{#if (eq CHECK_NAME "Check A")}}
183+
"url": "https://example.com/check-a",
184+
{{else if (eq CHECK_NAME "Check B")}}
185+
"url": "https://example.com/check-b",
186+
{{else}}
187+
"url": "https://example.com/default",
188+
{{/if}}
189+
"action_id": "open_link_button"
144190
},
145191
{
146192
"type": "button",
147193
"text": {
148194
"type": "plain_text",
149-
"text": "View Result",
195+
"text": "OTel Provider",
150196
"emoji": true
151197
},
152-
"url": "https://app.checklyhq.com/checks/{{CHECK_ID}}/results/{{RESULT_ID}}"
198+
"url": "https://example.com",
199+
"action_id": "open_link_button_needs_to_be_unique"
200+
}
201+
]
202+
},
203+
{
204+
"type": "context",
205+
"elements": [
206+
{
207+
"type": "plain_text",
208+
"text": "Tags: {{TAGS}} | UUID: {{CHECK_RESULT_ID}}",
209+
"emoji": false
153210
}
154211
]
155212
}
@@ -159,90 +216,24 @@ The following template uses conditional logic (`{{#if}}`) to change the message
159216
}
160217
```
161218

162-
### Template Variables
163-
164-
The template uses these Checkly variables:
165-
166-
- `{{CHECK_ID}}` - Unique identifier for the check
167-
- `{{CHECK_NAME}}` - Name of the check
168-
- `{{GROUP_NAME}}` - Name of the check group (if applicable)
169-
- `{{ALERT_TYPE}}` - Type of alert (ALERT_FAILURE, ALERT_RECOVERY, etc.)
170-
- `{{LOCATION}}` - Monitoring location where the check ran
171-
- `{{RESPONSE_TIME}}` - Response time in milliseconds
172-
- `{{TIMESTAMP}}` - When the check was executed
173-
- `{{ERROR_MESSAGE}}` - Error details (for failures)
174-
- `{{RESULT_ID}}` - Unique identifier for the check result
175-
176-
### Customization Options
177-
178-
You can further customize the template by:
179-
180-
- Adding more fields to display additional information
181-
- Changing colors based on alert severity
182-
- Including custom emojis or formatting
183-
- Adding conditional blocks for different alert types
184-
- Including links to your internal systems or dashboards
185-
186-
This custom webhook approach gives you complete control over the Slack message format while maintaining all the functionality of Checkly's native Slack integration.
187-
188-
## Advanced Slack Configuration
189-
190-
### Slack Channel Strategy
191-
192-
Organize alerts across different Slack channels based on your team structure and operational needs:
193-
194-
```yaml
195-
# Example Slack channel organization
196-
#alerts-critical:
197-
Checks: Core production services
198-
Alert Types: Failure, Recovery
199-
Escalation: @here for immediate attention
200-
201-
#alerts-performance:
202-
Checks: All API and browser checks
203-
Alert Types: Degradation, Recovery
204-
Escalation: No @here, passive monitoring
205-
206-
#alerts-security:
207-
Checks: SSL certificate monitoring
208-
Alert Types: SSL Expiration
209-
Escalation: @security-team
210-
211-
#alerts-staging:
212-
Checks: Development and staging environment
213-
Alert Types: All
214-
Escalation: @dev-team during business hours
215-
```
216-
217-
### Slack Message Formatting
219+
<Note>
220+
Be sure to update or remove the placeholder button links to Runbooks, OTel provider and anything else that is not needed for your use case.
221+
</Note>
218222

219-
Slack alerts include rich formatting and interactive elements. Here's what a typical alert looks like:
223+
<Note>
224+
Be sure each check mapped in the runbook logic has a corresponding URL. If a match isn’t found, fallback to a default documentation page.
225+
</Note>
220226

221-
```text
222-
🔴 **ALERT: Payment API has failed**
223-
224-
**Check**: Payment API Health Check
225-
**Location**: N. Virginia
226-
**Response Time**: 5,234ms
227-
**Started**: <!date^1642248622^{date_short_pretty} at {time}|2024-01-15 14:30:22 UTC>
228-
229-
**Error**: Connection timeout after 5000ms
230-
231-
[View Results](https://app.checklyhq.com/checks/abc123/results/def456) | [Check Config](https://app.checklyhq.com/checks/abc123)
232-
```
227+
### Testing the Webhook Limitations
228+
* You cannot use the **Test Webhook** button in Checkly for this template, as Slack requires valid payload structure and the test payload lacks real check data.
229+
* To test, trigger a real alert by adjusting a check so it fails, degrades, and recovers.
233230

234-
### Slack Threading and Updates
231+
### Examples of Alert Transitions
235232

236-
Configure how Checkly handles related alerts:
233+
![A customized slack message showing a failed alert](/images/docs/images/alerting/slack-custom-failed.png)
237234

238-
- **Thread updates**: Group related alerts (failure → recovery) in threads
239-
- **Channel posting**: Each alert as separate message for visibility
240-
- **Mention strategies**: Use @here/@channel appropriately based on severity
235+
![A customized slack message showing a degraded alert](/images/docs/images/alerting/slack-custom-degraded.png)
241236

242-
### Slack Best Practices
237+
![A customized slack message showing a recovered alert](/images/docs/images/alerting/slack-custom-recovered.png)
243238

244-
- Use separate channels for different severity levels (critical, standard, development)
245-
- Configure @here mentions only for critical production failures
246-
- Set up channel-specific notification schedules (e.g., mute development alerts after hours)
247-
- Use threaded conversations to reduce channel noise while maintaining visibility
248-
- Consider using channel prefixes like #alerts- for easy organization
239+
![A customized slack message showing a recovered alert from degraded state](/images/docs/images/alerting/slack-custom-recovered-degraded.png)

platform/network-diagnostic-tools.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: 'Network Diagnostic Tools in Checkly'
44
sidebarTitle: 'Network Diagnostic Tools'
55
---
66

7-
When troubleshooting network issues like DNS resolution failures, dropped packets, or broken TCP handshakes you often require low-level visibility into what's happening on the network.
7+
When troubleshooting network issues like dropped packets or broken TCP handshakes you often require low-level visibility into what's happening on the network.
88

99
That's where network diagnostic tools come in. They help you understand how data moves through a network and where things might be breaking down.
1010

@@ -23,7 +23,6 @@ TCP dumps give you a detailed look at what's happening at the packet level when
2323
- Did the TCP handshake complete?
2424
- Was the TLS handshake successful?
2525
- Were packets dropped, delayed, or malformed?
26-
- Did DNS resolution succeed?
2726

2827
This level of visibility is especially helpful for diagnosing flaky networking behavior.
2928

0 commit comments

Comments
 (0)