Skip to content

feat: Add TLS support#5

Open
jriouovh wants to merge 1 commit intoexogroup:masterfrom
jriouovh:tls
Open

feat: Add TLS support#5
jriouovh wants to merge 1 commit intoexogroup:masterfrom
jriouovh:tls

Conversation

@jriouovh
Copy link

Hello folks,

When TLS is enabled, the clickhouse-client must use the --secure option to connect. This commit adds a new argument -t 0|1, because -s was already used to define the host, to disable or enable the secure more. Only the -t 1 will enable the mode. Other options are ignored.

Example without the secure mode (default):

# ./check_clickhouse -m replication_active_replicas
REPLICATION_ACTIVE_REPLICAS CRITICAL: Unable to reach clickhouse

With the secure mode:

# ./check_clickhouse -m replication_active_replicas -t 1
REPLICATION_ACTIVE_REPLICAS OK: All tables have active_replicas=2

Without the secure mode but the argument provided:

# ./check_clickhouse -m replication_active_replicas -t 0
REPLICATION_ACTIVE_REPLICAS CRITICAL: Unable to reach clickhouse

With invalid arguments:

# ./check_clickhouse -m replication_active_replicas -t
Option '-t' requires an argument.
# ./check_clickhouse -m replication_active_replicas -t x
Option secure (-t) can only be 0 or 1

I wish you to have a nice day,
Julien

Signed-off-by: Julien Riou <julien.riou@ovhcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant