Skip to content

Commit

Permalink
Make metrics a requirement for tunnel ready command
Browse files Browse the repository at this point in the history
  • Loading branch information
firecow committed Nov 14, 2024
1 parent 95dff74 commit c39f0ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/cloudflared/tunnel/subcommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,10 @@ func buildReadyCommand() *cli.Command {

func readyCommand(c *cli.Context) error {
metricsOpts := c.String("metrics")
if !c.IsSet("metrics") {
return fmt.Errorf("--metrics has to be provided")
}

requestURL := fmt.Sprintf("http://%s/ready", metricsOpts)
res, err := http.Get(requestURL)
if err != nil {
Expand Down

0 comments on commit c39f0ae

Please sign in to comment.