Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -5,113 +5,16 @@ head: []
description: Use the API to set up and configure Magic Tunnel health alerts
---

import { APIRequest, Render, Tabs, TabItem } from "~/components";
import { Render } from "~/components";

<Render
file="magic-tunnel-health-alerts/magic-tunnel-health-alerts"
product="magic-wan"
params={{
magicWord: "Magic Transit",
productName: "Magic Transit",
backgroundInfoPath: "/magic-transit/reference/magic-tunnels/",
}}
/>

## Set up Magic Tunnel health alerts

<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">

<Render
file="magic-tunnel-health-alerts/setup-magic-tunnels-dash"
product="magic-wan"
params={{
productName: "Magic Transit",
}}
/>

</TabItem> <TabItem label="API">

:::note
Refer to the [documentation for Notifications](/notifications/get-started/) to learn about specific permissions you need to access the service via the API.
:::

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`.

<APIRequest
path="/accounts/{account_id}/alerting/v3/policies"
method="POST"
json={{
"alert_type": "magic_tunnel_health_check_event",
"description": "<DESCRIBE_POLICY>",
"enabled": true,
"filters": {
"slo": [
"99.9"
]
},
"mechanisms": {
"email": [
{
"id": "EMAIL_ADDRESS"
}
]},
"name": "<DESCRIBE_ALERT>"

}}
/>

```json output
{
"result": [
{
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
"name": "<POLICY_NAME>",
"description": "<POLICY_DESCRIPTION>",
"enabled": true,
"alert_type": "magic_tunnel_health_check_event",
"mechanisms": {
"email": [
{
"id": "<YOUR_EMAIL>"
}
]
},
"created": "2024-09-11T14:13:29.585658Z",
"modified": "2024-09-11T14:13:29.585658Z",
"conditions": {
"and": [
{
"or": [
{
"<=": [
{
"var": "slo"
},
"99.9"
]
}
]
}
]
},
"filters": {
"slo": ["99.9"]
}
}
],
"success": true,
"errors": [],
"messages": []
}
```

</TabItem> </Tabs>

<Render
file="magic-tunnel-health-alerts/recommended-slo"
product="magic-wan"
params={{
backgroundInfoPath: "/magic-transit/reference/magic-tunnels/",
networkAnalyticsPath: "/magic-transit/analytics/network-analytics/",
healthChecks: "/magic-transit/reference/tunnel-health-checks/",
}}
/>
/>
Original file line number Diff line number Diff line change
Expand Up @@ -5,110 +5,15 @@ head: []
description: Use the API to set up and configure Magic Tunnel health alerts
---

import { APIRequest, Render, Tabs, TabItem } from "~/components";
import { Render } from "~/components";

<Render
file="magic-tunnel-health-alerts/magic-tunnel-health-alerts"
params={{
magicWord: "Magic WAN",
productName: "Magic WAN",
backgroundInfoPath: "/magic-wan/reference/magic-tunnels/",
}}
/>

## Set up Magic Tunnel health alerts

<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">

<Render
file="magic-tunnel-health-alerts/setup-magic-tunnels-dash"
params={{
productName: "Magic WAN",
}}
/>

</TabItem> <TabItem label="API">

:::note
Refer to the [documentation for Notifications](/notifications/get-started/) to learn about specific permissions you need to access the service via the API.
:::

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`.

<APIRequest
path="/accounts/{account_id}/alerting/v3/policies"
method="POST"
json={{
"alert_type": "magic_wan_tunnel_health",
"description": "<DESCRIBE_POLICY>",
"enabled": true,
"filters": {
"slo": [
"99.9"
]
},
"mechanisms": {
"email": [
{
"id": "EMAIL_ADDRESS"
}
]},
"name": "<DESCRIBE_ALERT>"
}}
/>

```json output
{
"result": [
{
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
"name": "<POLICY_NAME>",
"description": "<POLICY_DESCRIPTION>",
"enabled": true,
"alert_type": "magic_wan_tunnel_health",
"mechanisms": {
"email": [
{
"id": "<YOUR_EMAIL>"
}
]
},
"created": "2024-09-11T14:13:29.585658Z",
"modified": "2024-09-11T14:13:29.585658Z",
"conditions": {
"and": [
{
"or": [
{
"<=": [
{
"var": "slo"
},
"99.9"
]
}
]
}
]
},
"filters": {
"slo": ["99.9"]
}
}
],
"success": true,
"errors": [],
"messages": []
}
```

</TabItem> </Tabs>

<Render
file="magic-tunnel-health-alerts/recommended-slo"
product="magic-wan"
params={{
backgroundInfoPath: "/magic-wan/reference/magic-tunnels/",
networkAnalyticsPath: "/magic-wan/analytics/network-analytics/",
healthChecks: "/magic-wan/reference/tunnel-health-checks/",
}}
/>
/>
Loading
Loading