diff --git a/cmd/cloudflared/tunnel/cmd.go b/cmd/cloudflared/tunnel/cmd.go index 067d79ba..823e2d3d 100644 --- a/cmd/cloudflared/tunnel/cmd.go +++ b/cmd/cloudflared/tunnel/cmd.go @@ -131,7 +131,7 @@ func Commands() []*cli.Command { buildVirtualNetworkSubcommand(false), buildRunCommand(), buildListCommand(), - buildHealthCommand(), + buildReadyCommand(), buildInfoCommand(), buildIngressSubcommand(), buildDeleteCommand(), diff --git a/cmd/cloudflared/tunnel/subcommands.go b/cmd/cloudflared/tunnel/subcommands.go index 98d97beb..96d51f32 100644 --- a/cmd/cloudflared/tunnel/subcommands.go +++ b/cmd/cloudflared/tunnel/subcommands.go @@ -398,10 +398,10 @@ func fmtConnections(connections []cfapi.Connection, showRecentlyDisconnected boo return strings.Join(output, ", ") } -func buildHealthCommand() *cli.Command { +func buildReadyCommand() *cli.Command { return &cli.Command{ Name: "health", - Action: cliutil.ConfiguredAction(healthCommand), + Action: cliutil.ConfiguredAction(readyCommand), Usage: "Tunnel health exit code", UsageText: "cloudflared tunnel [tunnel command options] health [subcommand options]", Description: "cloudflared tunnel health will return proper exit code if tunnel is healthy or unhealthy", @@ -410,8 +410,8 @@ func buildHealthCommand() *cli.Command { } } -func healthCommand(c *cli.Context) error { - requestURL := fmt.Sprintf("http://%s/healthcheck", c.String("metrics")) +func readyCommand(c *cli.Context) error { + requestURL := fmt.Sprintf("http://%s/ready", c.String("metrics")) res, err := http.Get(requestURL) if err != nil { return err