Cloudflare Docs
Cloudflare Zero Trust
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Tunnel metrics

Tunnel metrics show a Cloudflare Tunnel’s throughput and resource usage over time. When you run a tunnel, you can configure cloudflared to spin up a Prometheus metrics endpoint — an HTTP server that exposes metrics in Prometheus format. You can then use the Prometheus toolkit on a remote machine to scrape metrics data from the cloudflared server.

​​ Start the metrics server

Perform these steps on the cloudflared server.

  1. Use the –metrics flag to create a metrics endpoint at the specified IP address and port. Here is an example command for a locally-managed tunnel:

    $ cloudflared tunnel --metrics run my-tunnel

    To learn how to add the --metrics flag to a remotely-managed tunnel, refer to Configure a remotely-managed tunnel.

  1. Verify that the metrics server is running by going to http://localhost:60123/metrics. This will only work if you configured a localhost IP ( or

You can now export the metrics to Prometheus and Grafana in order to visualize and query the data. Refer to our tutorial for instructions on getting started with these tools.

​​ Available metrics

​​ cloudflared metrics

build_infoBuild and version information.GAUGEgoversion, revision, type, version
cloudflared_config_local_config_pushesNumber of local configuration pushes to Cloudflare.COUNTER
cloudflared_config_local_config_pushes_errorsNumber of errors that occurred during local configuration pushes.COUNTER
cloudflared_orchestration_config_versionConfiguration version.GAUGE
cloudflared_tcp_active_sessionsConcurrent number of TCP sessions that are being proxied to any origin.GAUGE
cloudflared_tcp_total_sessionsTotal number of TCP sessions that have been proxied to any origin.COUNTER
cloudflared_tunnel_active_streamsTotal number of active streams.GAUGE
cloudflared_tunnel_concurrent_requests_per_tunnelConcurrent number of requests proxied through each tunnel.GAUGE
cloudflared_tunnel_ha_connectionsNumber of active HA connections.GAUGE
cloudflared_tunnel_request_errorsNumber of errors proxying to origin.COUNTER
cloudflared_tunnel_server_locationsWhere each tunnel is connected to. 1 means current location, 0 means previous locations.GAUGEconnection_id, edge_location
cloudflared_tunnel_timer_retriesUnacknowledged heart beats count.GAUGE
cloudflared_tunnel_total_requestsNumber of requests proxied through all tunnels.COUNTER
cloudflared_tunnel_tunnel_authenticate_successNumber of successful tunnel authentication events.COUNTER
cloudflared_tunnel_tunnel_register_successNumber of successful tunnel registrations.COUNTERrpcName
cloudflared_udp_active_sessionsConcurrent number of UDP sessions that are being proxied to any origin.GAUGE
cloudflared_udp_total_sessionsTotal number of UDP sessions that have been proxied to any origin.GAUGE
coredns_panics_totalNumber of panics.COUNTER
quic_client_closed_connectionsNumber of connections that have been closed.COUNTER
quic_client_latest_rttLatest round-trip time (RTT) measured on a connection.GAUGEconn_index
quic_client_lost_packetsNumber of packets that have been lost from a connection.COUNTERconn_index, reason
quic_client_min_rttLowest RTT measured on a connection in ms.GAUGEconn_index
quic_client_packet_too_big_droppedNumber of packets received from origin that are too big to send to Cloudflare and are dropped as a result.COUNTER
quic_client_smoothed_rttSmoothed RTT calculated for a connection in ms.GAUGEconn_index
quic_client_total_connectionsNumber of connections initiated. For all QUIC metrics, client means the side initiating the connection.COUNTER

​​ Prometheus metrics

promhttp_metric_handler_requests_in_flightCurrent number of scrapes being served.GAUGE
promhttp_metric_handler_requests_totalTotal number of scrapes by HTTP status code.COUNTERcode

​​ Go runtime metrics

go_gc_duration_secondsA summary of the pause duration of garbage collection cycles.SUMMARY
go_goroutinesNumber of goroutines that currently exist.GAUGE
go_infoInformation about the Go environment.GAUGEversion
go_memstats_alloc_bytesNumber of bytes allocated and still in use.GAUGE
go_memstats_alloc_bytes_totalTotal number of bytes allocated, even if freed.COUNTER
go_memstats_buck_hash_sys_bytesNumber of bytes used by the profiling bucket hash table.GAUGE
go_memstats_frees_totalTotal number of frees.COUNTER
go_memstats_gc_sys_bytesNumber of bytes used for garbage collection system metadata.GAUGE
go_memstats_heap_alloc_bytesNumber of heap bytes allocated and still in use.GAUGE
go_memstats_heap_idle_bytesNumber of heap bytes waiting to be used.GAUGE
go_memstats_heap_inuse_bytesNumber of heap bytes that are in use.GAUGE
go_memstats_heap_objectsNumber of allocated objects.GAUGE
go_memstats_heap_released_bytesNumber of heap bytes released to OS.GAUGE
go_memstats_heap_sys_bytesNumber of heap bytes obtained from system.GAUGE
go_memstats_last_gc_time_secondsNumber of seconds since 1970 of last garbage collection.GAUGE
go_memstats_lookups_totalTotal number of pointer lookups.COUNTER
go_memstats_mallocs_totalTotal number of mallocs.COUNTER
go_memstats_mcache_inuse_bytesNumber of bytes in use by mcache structures.GAUGE
go_memstats_mcache_sys_bytesNumber of bytes used for mcache structures obtained from system.GAUGE
go_memstats_mspan_inuse_bytesNumber of bytes in use by mspan structures.GAUGE
go_memstats_mspan_sys_bytesNumber of bytes used for mspan structures obtained from system.GAUGE
go_memstats_next_gc_bytesNumber of heap bytes when next garbage collection will take place.GAUGE
go_memstats_other_sys_bytesNumber of bytes used for other system allocations.GAUGE
go_memstats_stack_inuse_bytesNumber of bytes in use by the stack allocator.GAUGE