Skip to content

Commit f0e2150

Browse files
marciocloudflareRebeccaTamachiro
authored andcommitted
[Magic] Consolidates tunnel alerts partials (#21130)
* added setup dash * added api note * imported comps * added apirequest * added json output to pre * added api * removed api from pages * added recommended slos content * edited pages * added magic word * imported code comp * added Code to json output * added code * removed old partials * removed markdown comp
1 parent cc76d97 commit f0e2150

File tree

5 files changed

+207
-244
lines changed

5 files changed

+207
-244
lines changed

src/content/docs/magic-transit/how-to/configure-magic-tunnel-alerts.mdx

Lines changed: 3 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -5,113 +5,16 @@ head: []
55
description: Use the API to set up and configure Magic Tunnel health alerts
66
---
77

8-
import { APIRequest, Render, Tabs, TabItem } from "~/components";
8+
import { Render } from "~/components";
99

1010
<Render
1111
file="magic-tunnel-health-alerts/magic-tunnel-health-alerts"
1212
product="magic-wan"
1313
params={{
14+
magicWord: "Magic Transit",
1415
productName: "Magic Transit",
1516
backgroundInfoPath: "/magic-transit/reference/magic-tunnels/",
16-
}}
17-
/>
18-
19-
## Set up Magic Tunnel health alerts
20-
21-
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
22-
23-
<Render
24-
file="magic-tunnel-health-alerts/setup-magic-tunnels-dash"
25-
product="magic-wan"
26-
params={{
27-
productName: "Magic Transit",
28-
}}
29-
/>
30-
31-
</TabItem> <TabItem label="API">
32-
33-
:::note
34-
Refer to the [documentation for Notifications](/notifications/get-started/) to learn about specific permissions you need to access the service via the API.
35-
:::
36-
37-
Send a [`POST` request](/api/resources/alerting/subresources/policies/methods/create/) to create a Magic Transit tunnel health alert. You can set tunnel health alerts with any SLO value between `0` and `99.99`.
38-
39-
<APIRequest
40-
path="/accounts/{account_id}/alerting/v3/policies"
41-
method="POST"
42-
json={{
43-
"alert_type": "magic_tunnel_health_check_event",
44-
"description": "<DESCRIBE_POLICY>",
45-
"enabled": true,
46-
"filters": {
47-
"slo": [
48-
"99.9"
49-
]
50-
},
51-
"mechanisms": {
52-
"email": [
53-
{
54-
"id": "EMAIL_ADDRESS"
55-
}
56-
]},
57-
"name": "<DESCRIBE_ALERT>"
58-
59-
}}
60-
/>
61-
62-
```json output
63-
{
64-
"result": [
65-
{
66-
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
67-
"name": "<POLICY_NAME>",
68-
"description": "<POLICY_DESCRIPTION>",
69-
"enabled": true,
70-
"alert_type": "magic_tunnel_health_check_event",
71-
"mechanisms": {
72-
"email": [
73-
{
74-
"id": "<YOUR_EMAIL>"
75-
}
76-
]
77-
},
78-
"created": "2024-09-11T14:13:29.585658Z",
79-
"modified": "2024-09-11T14:13:29.585658Z",
80-
"conditions": {
81-
"and": [
82-
{
83-
"or": [
84-
{
85-
"<=": [
86-
{
87-
"var": "slo"
88-
},
89-
"99.9"
90-
]
91-
}
92-
]
93-
}
94-
]
95-
},
96-
"filters": {
97-
"slo": ["99.9"]
98-
}
99-
}
100-
],
101-
"success": true,
102-
"errors": [],
103-
"messages": []
104-
}
105-
```
106-
107-
</TabItem> </Tabs>
108-
109-
<Render
110-
file="magic-tunnel-health-alerts/recommended-slo"
111-
product="magic-wan"
112-
params={{
113-
backgroundInfoPath: "/magic-transit/reference/magic-tunnels/",
11417
networkAnalyticsPath: "/magic-transit/analytics/network-analytics/",
11518
healthChecks: "/magic-transit/reference/tunnel-health-checks/",
11619
}}
117-
/>
20+
/>

src/content/docs/magic-wan/configuration/common-settings/configure-magic-tunnel-alerts.mdx

Lines changed: 3 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -5,110 +5,15 @@ head: []
55
description: Use the API to set up and configure Magic Tunnel health alerts
66
---
77

8-
import { APIRequest, Render, Tabs, TabItem } from "~/components";
8+
import { Render } from "~/components";
99

1010
<Render
1111
file="magic-tunnel-health-alerts/magic-tunnel-health-alerts"
1212
params={{
13+
magicWord: "Magic WAN",
1314
productName: "Magic WAN",
1415
backgroundInfoPath: "/magic-wan/reference/magic-tunnels/",
15-
}}
16-
/>
17-
18-
## Set up Magic Tunnel health alerts
19-
20-
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
21-
22-
<Render
23-
file="magic-tunnel-health-alerts/setup-magic-tunnels-dash"
24-
params={{
25-
productName: "Magic WAN",
26-
}}
27-
/>
28-
29-
</TabItem> <TabItem label="API">
30-
31-
:::note
32-
Refer to the [documentation for Notifications](/notifications/get-started/) to learn about specific permissions you need to access the service via the API.
33-
:::
34-
35-
Send a [`POST` request](/api/resources/alerting/subresources/policies/methods/create/) to create a Magic WAN tunnel health alert. You can set tunnel health alerts with any SLO value between `0` and `99.99`.
36-
37-
<APIRequest
38-
path="/accounts/{account_id}/alerting/v3/policies"
39-
method="POST"
40-
json={{
41-
"alert_type": "magic_wan_tunnel_health",
42-
"description": "<DESCRIBE_POLICY>",
43-
"enabled": true,
44-
"filters": {
45-
"slo": [
46-
"99.9"
47-
]
48-
},
49-
"mechanisms": {
50-
"email": [
51-
{
52-
"id": "EMAIL_ADDRESS"
53-
}
54-
]},
55-
"name": "<DESCRIBE_ALERT>"
56-
}}
57-
/>
58-
59-
```json output
60-
{
61-
"result": [
62-
{
63-
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
64-
"name": "<POLICY_NAME>",
65-
"description": "<POLICY_DESCRIPTION>",
66-
"enabled": true,
67-
"alert_type": "magic_wan_tunnel_health",
68-
"mechanisms": {
69-
"email": [
70-
{
71-
"id": "<YOUR_EMAIL>"
72-
}
73-
]
74-
},
75-
"created": "2024-09-11T14:13:29.585658Z",
76-
"modified": "2024-09-11T14:13:29.585658Z",
77-
"conditions": {
78-
"and": [
79-
{
80-
"or": [
81-
{
82-
"<=": [
83-
{
84-
"var": "slo"
85-
},
86-
"99.9"
87-
]
88-
}
89-
]
90-
}
91-
]
92-
},
93-
"filters": {
94-
"slo": ["99.9"]
95-
}
96-
}
97-
],
98-
"success": true,
99-
"errors": [],
100-
"messages": []
101-
}
102-
```
103-
104-
</TabItem> </Tabs>
105-
106-
<Render
107-
file="magic-tunnel-health-alerts/recommended-slo"
108-
product="magic-wan"
109-
params={{
110-
backgroundInfoPath: "/magic-wan/reference/magic-tunnels/",
11116
networkAnalyticsPath: "/magic-wan/analytics/network-analytics/",
11217
healthChecks: "/magic-wan/reference/tunnel-health-checks/",
11318
}}
114-
/>
19+
/>

0 commit comments

Comments
 (0)