Skip to content

Commit

Permalink
chore: support monitor for clickhouse
Browse files Browse the repository at this point in the history
  • Loading branch information
sophon-zt committed Nov 10, 2023
1 parent bb52ad8 commit 69d1e0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions addons/clickhouse/configs/00_default_overrides.xml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
</zookeeper>
{{- end }}
{{- end }}
{{- if $.component.monitor.enable }}
<!-- Prometheus metrics -->
<prometheus>
<endpoint>/metrics</endpoint>
Expand All @@ -54,5 +53,4 @@
<events>true</events>
<asynchronous_metrics>true</asynchronous_metrics>
</prometheus>
{{- end }}
</clickhouse>
6 changes: 6 additions & 0 deletions addons/clickhouse/templates/clusterdefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ spec:
value: "default"
- name: CLICKHOUSE_SHARD_ID
value: "$(KB_COMP_NAME)"
- name: SERVICE_PORT
value: "$(CLICKHOUSE_METRICS_PORT)"
- name: CLICKHOUSE_REPLICA_ID
valueFrom:
fieldRef:
Expand Down Expand Up @@ -202,6 +204,8 @@ spec:
value: "9181"
- name: CLICKHOUSE_METRICS_PORT
value: "8001"
- name: SERVICE_PORT
value: "$(CLICKHOUSE_METRICS_PORT)"
ports:
- name: tcp
containerPort: 2181
Expand Down Expand Up @@ -346,6 +350,8 @@ spec:
value: "$(KB_POD_NAME)"
- name: POD_NAMESPACE
value: "$(KB_NAMESPACE)"
- name: SERVICE_PORT
value: "$(ZOO_PROMETHEUS_METRICS_PORT_NUMBER)"
# TODO: using componentDefRef to inject zookeeper or keeper env
ports:
- name: client
Expand Down

0 comments on commit 69d1e0e

Please sign in to comment.