Skip to Content
Teitunnel

Guides

Traffic, logs and notifications

Watch a Cloudflare Tunnel connector's traffic, read logs per connector and per route, follow the live log of any machine running a tunnel, and get notified when a connector goes down, keeps crashing or the Doctor finds a problem. In the app and from a terminal.

Teitunnel shows what this computer's connectors are doing (requests, failures, the round trip to Cloudflare, their logs) and tells you when something goes wrong, even with the window closed. For per-route numbers from Cloudflare's edge and uptime checks, see analytics, uptime and alerts; for individual requests, the inspector.

Traffic

Tunnels: this computer's tunnel with its connector and traffic chart

Select a tunnel in Tunnels; its Traffic section charts this computer's connector:

  • Requests and Failed requests per second;
  • the Round trip to Cloudflare;
  • over the last Hour, Day or Week.

Below the charts: Now (the current rate, such as 4.2 requests/s), Responses by status class (2xx, 3xx, 4xx, 5xx), Since start (1,204 requests, 3 failed), the number of Connections, and the Edge locations in use (such as AMS01, FRA08).

Overview is the live dashboard. A banner says whether everything is healthy or what the Doctor found. Then a row of cards: Traffic (requests per second and a sparkline of the last hour), Errors (the share of the last 5 minutes' requests that got a 5xx or never reached your service; orange for any, red over 5%), Edge round trip to Cloudflare, Uptime (whether every checked route is up, and the lowest 24-hour uptime), Routes (how many are live) and Quick Shares. Below them, a Traffic chart of the last hour, the Responses by class (2xx, 3xx, 4xx, 5xx) with totals, your routes, your Quick Shares, Recent Requests to inspected shares and routes as they arrive (each opens in the Inspector), and recent Activity. On a wide window the cards spread across it, up to six in a row.

While the chart is open it updates every second; otherwise the connector is sampled every 10 seconds. History is kept per minute for seven days, so the Day and Week views survive restarts. The numbers come from the connector's own metrics on this computer: they count every request it carried, and nothing is sent anywhere.

cloudflared reports traffic per tunnel, not per hostname, so these numbers cover all of the tunnel's routes together. Per-route numbers come from Cloudflare's edge in Analytics.

Logs

  • Tunnels ▸ Logs shows the connector's log: connections to Cloudflare opening and closing, configuration updates, and errors reaching your services.
  • Routes, select a route, Logs shows only the lines about that route's requests. cloudflared logs failed requests; successful ones are logged only at debug level, so an empty log says No failed requests. Successful ones aren't logged.

The log viewer can Show All, Warnings or Errors, Search the log, Pause and Resume it, Copy the visible lines, or Save them to a file. Secrets are removed from saved logs.

The connector's log is kept in bounded files in Teitunnel's data folder, including for Always-on connectors, so it survives restarts without growing forever. For a request-level view (headers, bodies, timing), use the inspector.

Machines running a tunnel

Tunnels lists every machine connected for a tunnel, with this computer marked (This Mac): its public address, cloudflared version and the Cloudflare locations it connects to. A route's Machines section shows the same for the tunnel that carries it.

Choose Logs next to another machine to follow its connector's log live (Connector Logs, Relayed live by Cloudflare while this is open), with nothing to install there. It works for any tunnel in the account, such as one running on a server, and shows warnings, errors and connection changes. It needs the account's token to have the Cloudflare Tunnel permission (Edit).

If another machine also runs this computer's tunnel, the Doctor warns you: Another machine also runs this Mac's tunnel. Cloudflare splits requests between the machines running a tunnel, and each sends them to its own services, so some visitors reach the other machine instead of this one. Find it with its logs and stop cloudflared there. When the other machine is supposed to serve the same routes, that's load balancing or adopting a tunnel.

Notifications

Teitunnel notifies you when:

WhenNotificationSetting
This computer's connector loses its connection for more than 20 seconds, and when it's backRoutes on this Mac are down / Routes are backRoutes down or back
A connector keeps crashingThe connector keeps stoppingRoutes down or back
The Doctor finds a new problem (it checks every few minutes, also with the window closed)The problem's title, or Teitunnel found 3 problemsProblems
A Quick Share goes live or stops workingQuick Share is live / Quick Share stopped workingQuick Shares
A route goes down, errors or slows downSee alertsAlerts
A request hits a watched pathRequest to /webhooks/stripePer share or route

Brief blips stay quiet, each problem is announced once, and nothing is shown while a Teitunnel window is in front.

Sleep, wake and network changes

Teitunnel notices when your computer wakes from sleep, comes back online or moves to another network (another Wi-Fi, a VPN turned on or off). Connectors that were waiting to try again start at once, and one still without a connection 15 seconds later is restarted. Quick Shares are left to reconnect by themselves, so they keep their address. For 90 seconds after such a change, nothing is reported as down: a connector that's still down after that is. A connector that kept stopping while you were offline tries again when the network is back, and every 10 minutes until then. Always-on connectors are restarted by your system's service manager. Turn each kind on or off in Settings ▸ General ▸ Notifications; alerts also have Quiet hours. How notifications look is up to your system (on macOS, System Settings ▸ Notifications).

From a terminal

teitunnel status              # whether the app runs, and what it serves
teitunnel top                 # live dashboard: shares, routes, traffic, requests (q quits, ? for keys)
teitunnel routes              # each route and its status
teitunnel routes --check      # exit status 1 unless every route is live
teitunnel doctor              # the Doctor's checks; exit status 1 on an error
teitunnel traffic watch       # requests as they arrive, from the inspector

teitunnel up prints each tunnel's state as it changes (laptop: connected, laptop: connection lost, reconnecting) and any alerts. teitunnel top uses the running app when there is one; --here reads this computer's records without it.

On a server, teitunnel serve shows the same in a web dashboard and its JSON API; see servers and the API.

Diagnostics

Help ▸ Export Diagnostics… saves a small .tar.gz with what's useful for a bug report: a summary, the Doctor's results, your settings and the end of the newest logs, all with secrets removed. The file list is shown before anything is written. Attach it to an issue with Help ▸ Report an Issue….

Troubleshooting

  • The chart says Traffic appears here a few seconds after the connector starts. The connector isn't running yet, or just started.
  • The Day or Week view is empty (History appears here after the connector has run for a minute.). History is kept per minute; give it a minute.
  • A route's Logs are empty but visitors see errors. The errors may come from Cloudflare before the request reaches the tunnel (a login, a firewall rule, a missing DNS record). Test the route, or look at the Doctor.
  • Another machine's Logs don't connect. The token needs Cloudflare Tunnel · Edit; see accounts.
Edit on GitHub

Last updated on

On this page