[DBMON-6892] Report ClickHouse cluster topology in the database_instance payload - #24889
Open
sangeetashivaji wants to merge 1 commit into
Conversation
evalya-impact-summaryevalya impact analysis |
Contributor
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: f0a4cf5 | Docs | View more details | Give us feedback! |
sangeetashivaji
commented
Aug 17, 2026
sangeetashivaji
commented
Aug 17, 2026
Adds the hosting type, the connection mode and the cluster node inventory (connected node plus the node list) to the database_instance metadata. Keys are omitted rather than reported empty, so a failed probe never claims a cluster has no nodes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
sangeetashivaji
force-pushed
the
sangeeta/clickhouse-database-instance-cluster-topology
branch
from
August 19, 2026 17:57
1448b88 to
f0a4cf5
Compare
sangeetashivaji
changed the base branch from
master
to
sangeeta/clickhouse-cluster-fanout-fix
August 19, 2026 17:57
Contributor
Validation ReportAll 21 validations passed. Show details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds the hosting type, the connection mode and the cluster node inventory (the connected node plus the node list) to the ClickHouse
database_instancemetadata payload. Keys are omitted rather than reported empty, so a failed probe never claims a cluster has no nodes.The
clusterAllReplicasfan-out fix that used to live here is split out into #24920, keeping the two changelog entries separate (fixedthere,addedhere). This PR is stacked on that branch and should be merged after it.[ { "host": "bpzyyp5jlh.us-east-2.aws.clickhouse.cloud", "port": 8443, "database_instance": "bpzyyp5jlh.us-east-2.aws.clickhouse.cloud:8443:default", "database_hostname": "bpzyyp5jlh.us-east-2.aws.clickhouse.cloud", "agent_version": "7.77.2", "ddagenthostname": "dbm-orders-clickhouse-cloud-sangeeta.shivajirao", "dbms": "clickhouse", "kind": "database_instance", "collection_interval": 300, "dbms_version": "26.2.1.558", "integration_version": "7.2.0", "tags": [ "env:local", "deployment:cloud", "user:sangeeta", "server:bpzyyp5jlh.us-east-2.aws.clickhouse.cloud", "port:8443", "database_hostname:bpzyyp5jlh.us-east-2.aws.clickhouse.cloud", "database_instance:bpzyyp5jlh.us-east-2.aws.clickhouse.cloud:8443:default", "clickhouse_cluster:default", "hosting_type:clickhouse-cloud" ], "timestamp": 1787147945024.457, "metadata": { "dbm": true, "connection_host": "bpzyyp5jlh.us-east-2.aws.clickhouse.cloud", "hosting_type": "clickhouse-cloud", "single_endpoint_mode": true, "cluster_name": "default", "connect_node": "c-mintaws-bz-27-server-rbdgg8n-0", "nodes": [ "c-mintaws-bz-27-server-rbdgg8n-0", "c-mintaws-bz-27-server-t2d8t8j-0" ] } } ]The cluster name is not always
default[ { "host": "clickhouse-lb", "port": 8123, "database_instance": "clickhouse-lb:8123:default", "database_hostname": "clickhouse-lb", "agent_version": "7.77.2", "ddagenthostname": "dbm-orders-local-clickhouse-se-sangeeta.shivajirao", "dbms": "clickhouse", "kind": "database_instance", "collection_interval": 300, "dbms_version": "24.8.14.39", "integration_version": "7.2.0", "tags": [ "env:local", "deployment:self-hosted", "endpoint:single", "user:sangeeta", "server:clickhouse-lb", "port:8123", "database_hostname:clickhouse-lb", "database_instance:clickhouse-lb:8123:default", "clickhouse_cluster:dbm_single_endpoint", "hosting_type:self-hosted" ], "timestamp": 1787153884466.4001, "metadata": { "dbm": true, "connection_host": "clickhouse-lb", "hosting_type": "self-hosted", "single_endpoint_mode": true, "cluster_name": "dbm_single_endpoint", "connect_node": "clickhouse-se-01", "nodes": [ "clickhouse-se-01", "clickhouse-se-02", "clickhouse-se-03" ] } } ][ { "host": "clickhouse-03", "port": 8123, "database_instance": "clickhouse-03:8123:default", "database_hostname": "clickhouse-03", "agent_version": "7.77.2", "ddagenthostname": "dbm-orders-local-clickhouse-sangeeta.shivajirao", "dbms": "clickhouse", "kind": "database_instance", "collection_interval": 300, "dbms_version": "24.8.14.39", "integration_version": "7.2.0", "tags": [ "env:local", "node:clickhouse-03", "deployment:self-hosted", "server:clickhouse-03", "port:8123", "database_hostname:clickhouse-03", "database_instance:clickhouse-03:8123:default", "clickhouse_cluster:default", "hosting_type:self-hosted" ], "timestamp": 1787152211758.7336, "metadata": { "dbm": true, "connection_host": "clickhouse-03", "hosting_type": "self-hosted", "single_endpoint_mode": false, "cluster_name": "default", "connect_node": "clickhouse-03", "nodes": [ "clickhouse-03" ] } } ]Motivation
The backend needs to know whether the
hostName()it sees behind a single endpoint is one node or a whole cluster, and which nodes make up that cluster.Testing
Tested on staging.
Review checklist (to be filled by reviewers)
qa/skip-qalabel if the PR does not need to be tested during QA. If the PR needs to be tested during QA, you should addqa/requiredlabel.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged