WisdomSky / Cloudflared-web

Cloudflared-web is a docker image that packages both cloudflared cli and a simple Web UI to easily start or stop remotely-managed Cloudflare tunnel.
160 stars 22 forks source link

Support for extra CLI commands - specifically metrics #9

Closed MariusVB closed 7 months ago

MariusVB commented 7 months ago

Hi,

I would like to also have the metrics server running. Do you have support for extra CLI commands, specifically metrics? https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/monitor-tunnels/metrics/

WisdomSky commented 7 months ago

Hi @MariusVB,

Right now, other cloudflared cli flags aren't supported. Will take note of this and consider implementing it.

MariusVB commented 7 months ago

Hero!

WisdomSky commented 7 months ago

Hi @MariusVB,

Using Tunnel Metrics is now supported starting on 2024.2.1. (re-pull the image if you are currently using the same tag)

services:
  cloudflared:
    image: wisdomsky/cloudflared-web:latest
    restart: unless-stopped
    network_mode: host
    environment:
      METRICS_ENABLE: 'true'

The default port of the metrics server is 60123, however you can change it to something else by specifying the METRICS_PORT environment variable.

services:
  cloudflared:
    image: wisdomsky/cloudflared-web:latest
    restart: unless-stopped
    network_mode: host
    environment:
      METRICS_ENABLE: 'true'
      METRICS_PORT: 8080
MariusVB commented 7 months ago

I'll test later when I get home. Thanks a lot!