Support monitoring cloudflare zero trust tunnel connectivity status #2344

Closed
opened 2026-02-28 02:51:20 -05:00 by deekerman · 2 comments
Owner

Originally created by @AndLindemann on GitHub (Jul 6, 2023).

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find similar feature request

🏷️ Feature Request Type

New Monitor

🔖 Feature description

It'd be nice if Uptime Kuma could also monitor existing cloudflare zero trust tunnels for their current connection status.
The cloudflare API allows that via accountid + tunnel id + api token.
That way we could get alerts when one of our cloudflare tunnels goes down / is not connected to cloudflare anymore.

✔️ Solution

Use the cloudflare API to retrieve the tunnel status from cloudflare to see whether it is healthy and connected or not. Use the result to update the monitor status.
Related cloudflare API docs: https://developers.cloudflare.com/api/operations/cloudflare-tunnel-list-cloudflare-tunnels

In the result output there would be an array of result objects, where the "status" field is the relevant field for determining if the tunnel is healthy or not.

Alternatives

No response

📝 Additional Context

The list of tunnels for your account can be found on the zero trust dashboard https://one.dash.cloudflare.com/ under Access -> Tunnels, there you can also find the tunnel id for each tunnel.

Homepage for example has a widget that does this and can show if the tunnel with the corresponding tunnel id is currently connected or not: https://gethomepage.dev/en/services/cloudflared/
But Homepage is not really a tool for monitoring, so there is still value in having it in uptime-kuma for proper monitoring and alerts.

Originally created by @AndLindemann on GitHub (Jul 6, 2023). ### ⚠️ Please verify that this feature request has NOT been suggested before. - [X] I checked and didn't find similar feature request ### 🏷️ Feature Request Type New Monitor ### 🔖 Feature description It'd be nice if Uptime Kuma could also monitor existing cloudflare zero trust tunnels for their current connection status. The cloudflare API allows that via accountid + tunnel id + api token. That way we could get alerts when one of our cloudflare tunnels goes down / is not connected to cloudflare anymore. ### ✔️ Solution Use the cloudflare API to retrieve the tunnel status from cloudflare to see whether it is healthy and connected or not. Use the result to update the monitor status. Related cloudflare API docs: https://developers.cloudflare.com/api/operations/cloudflare-tunnel-list-cloudflare-tunnels In the result output there would be an array of result objects, where the "status" field is the relevant field for determining if the tunnel is healthy or not. ### ❓ Alternatives _No response_ ### 📝 Additional Context The list of tunnels for your account can be found on the zero trust dashboard https://one.dash.cloudflare.com/ under Access -> Tunnels, there you can also find the tunnel id for each tunnel. Homepage for example has a widget that does this and can show if the tunnel with the corresponding tunnel id is currently connected or not: https://gethomepage.dev/en/services/cloudflared/ But Homepage is not really a tool for monitoring, so there is still value in having it in uptime-kuma for proper monitoring and alerts.
deekerman 2026-02-28 02:51:20 -05:00
Author
Owner

@CommanderStorm commented on GitHub (Feb 11, 2024):

Related https://github.com/louislam/uptime-kuma/issues/3875

@CommanderStorm commented on GitHub (Feb 11, 2024): Related https://github.com/louislam/uptime-kuma/issues/3875
Author
Owner

@GAS85 commented on GitHub (Oct 21, 2025):

This is quite easy to configure with current setup:

  1. Create new Monitor type "HTTP(s) - Json Query"
  2. Set "URL" as from you documentation, e.g. https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tunnels. To get an ACCOUNT_ID, visit https://one.dash.cloudflare.com and select your account. Copy ID from URL https://one.dash.cloudflare.com/yourAccountID
  3. Set "Json Query" to result[0].status
  4. Set "Expected Value" to healthy
  5. Visit https://dash.cloudflare.com/profile/api-tokens and create a new API Token with scope Cloudflare One Connector: cloudflared Read
  6. Set "Headers" to:
{
    "Authorization": "Bearer HereIsYourAPIToken"
}
  1. Save it.

If you have multiple tunnels, you can monitor each separately by updating query to $.result[id="Tunnel ID"].status.

@GAS85 commented on GitHub (Oct 21, 2025): This is quite easy to configure with current setup: 1. Create new Monitor type "HTTP(s) - Json Query" 2. Set "URL" as from you documentation, e.g. `https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tunnels`. To get an `ACCOUNT_ID`, visit https://one.dash.cloudflare.com and select your account. Copy ID from URL `https://one.dash.cloudflare.com/yourAccountID` 3. Set "Json Query" to `result[0].status` 4. Set "Expected Value" to `healthy` 5. Visit https://dash.cloudflare.com/profile/api-tokens and create a new API Token with scope `Cloudflare One Connector: cloudflared Read` 6. Set "Headers" to: ```json { "Authorization": "Bearer HereIsYourAPIToken" } ``` 7. Save it. If you have multiple tunnels, you can monitor each separately by updating query to `$.result[id="Tunnel ID"].status`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#2344
No description provided.