Skip to content

Commit e01753e

Browse files
Deprecate 'ctl node_health_check'
* It requires a fully booted node, so not generally suitable for a Kubernetes readiness probe. * It can produce false positives * It is too intrusive and CPU-intensive to use at scale * Most operators do not understand what it really does and when they learn about it, consider it to be too opinionated and intrusive Time for the One True Health Check™ to retire from duty. Part of rabbitmq/rabbitmq-cli#426
1 parent d25a118 commit e01753e

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

deps/rabbitmq_cli/lib/rabbitmq/cli/ctl/commands/node_health_check_command.ex

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ defmodule RabbitMQ.CLI.Ctl.Commands.NodeHealthCheckCommand do
6565

6666
def output({:healthcheck_failed, message}, _) do
6767
{:error, RabbitMQ.CLI.Core.ExitCodes.exit_software(),
68-
"Error: healthcheck failed. Message: #{message}"}
68+
"Error: health check failed. Message: #{message}"}
6969
end
7070

7171
use RabbitMQ.CLI.DefaultOutput
@@ -78,10 +78,19 @@ defmodule RabbitMQ.CLI.Ctl.Commands.NodeHealthCheckCommand do
7878
]
7979
end
8080

81-
def help_section(), do: :observability_and_health_checks
82-
def description(), do: "Performs several opinionated health checks of the target node"
81+
def help_section(), do: :deprecated
82+
def description() do
83+
"DEPRECATED. Performs intrusive, opinionated health checks on a fully booted node. " <>
84+
"See https://www.rabbitmq.com/monitoring.html#health-checks instead"
85+
end
8386

8487
def banner(_, %{node: node_name, timeout: timeout}) do
85-
["Timeout: #{trunc(timeout / 1000)} seconds ...", "Checking health of node #{node_name} ..."]
88+
[
89+
"This command is DEPRECATED and will be removed in a future version.",
90+
"It performs intrusive, opinionated health checks and requires a fully booted node.",
91+
"Use one of the options covered in https://www.rabbitmq.com/monitoring.html#health-checks instead.",
92+
"Timeout: #{trunc(timeout / 1000)} seconds ...",
93+
"Checking health of node #{node_name} ..."
94+
]
8695
end
8796
end

0 commit comments

Comments
 (0)