Code Monkey home page Code Monkey logo

Comments (7)

matt-laird avatar matt-laird commented on July 26, 2024 2

I think sh and/or curl would be useful, curl can be used to check an endpoint is unavailable via the active tunnel, or shell could be used to scrape the logs for retries and errors. Both of these would yield an unhealthy state.

from cloudflared-docker.

Jiriteach avatar Jiriteach commented on July 26, 2024 2

Its possible if you start the tunnel with a metrics flag. See here - https://yaleman.org/post/2021/2021-01-11-monitoring-cloudflared/

OR

You could monitor via Cloudflare via API

Use a GET on https://api.cloudflare.com/client/v4/accounts/:account_identifier/tunnels endpoint for getting the tunnel status/connections.

Cloudflare API v4 documentation - https://api.cloudflare.com/#getting-started-endpoints has instructions on how to make API requests & generate the necessary tokens.

from cloudflared-docker.

Erisa avatar Erisa commented on July 26, 2024

Good question! I have not tried this and have not personally implemented a health check for cloudflared before.

If you could, what command would you use to run your health checks? What resources would you check against?

from cloudflared-docker.

matt-laird avatar matt-laird commented on July 26, 2024

Thanks for the suggestions @Jiriteach I tried option one, seems I can't access the server no matter what I do. I've set & exposed the port, but my curl results in a connection refused.

Am I understanding correctly that you should be able to access this endpoint outside the container? I avoided suggested option two because it seems silly to have to ask a public facing Cloudflare API for metrics that are already on local.

from cloudflared-docker.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.