-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds Clickhouse metrics to Operator / Clickhouse tab
- Loading branch information
1 parent
954678f
commit c8f99da
Showing
4 changed files
with
181 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
33 changes: 33 additions & 0 deletions
33
tutoraspects/templates/openedx-assets/assets/charts/clickhouse_metrics.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
_file_name: clickhouse_metrics.yaml | ||
slice_name: ClickHouse metrics | ||
description: null | ||
certified_by: null | ||
certification_details: null | ||
viz_type: table | ||
params: | ||
datasource: 30__table | ||
viz_type: table | ||
query_mode: raw | ||
groupby: [] | ||
time_grain_sqla: P1D | ||
temporal_columns_lookup: {} | ||
all_columns: | ||
- name | ||
- value | ||
- description | ||
percent_metrics: [] | ||
adhoc_filters: [] | ||
order_by_cols: [] | ||
row_limit: 1000 | ||
server_page_length: 10 | ||
order_desc: true | ||
table_timestamp_format: smart_date | ||
show_cell_bars: true | ||
color_pn: true | ||
extra_form_data: {} | ||
dashboards: [] | ||
query_context: null | ||
cache_timeout: null | ||
uuid: 2f84cbc3-4068-4d4d-bd40-ae348e4be95d | ||
version: 1.0.0 | ||
dataset_uuid: 9eee1df8-ad25-4d0f-8e53-90c277cf28e4 |
This file contains 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
117 changes: 117 additions & 0 deletions
117
tutoraspects/templates/openedx-assets/assets/datasets/clickhouse_computed_metrics.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
_file_name: clickhouse_computed_metrics.yaml | ||
table_name: clickhouse_computed_metrics | ||
main_dttm_col: null | ||
description: null | ||
default_endpoint: null | ||
offset: 0 | ||
cache_timeout: null | ||
schema: system | ||
sql: | | ||
SELECT | ||
name, | ||
toFloat64(value) AS value, | ||
description | ||
FROM system.metrics | ||
WHERE metric IN ( | ||
'Query', | ||
'DelayedInserts', | ||
'DistributedFilesToInsert' | ||
) | ||
UNION ALL | ||
SELECT | ||
metric AS name, | ||
round(toFloat64(value), 2) AS value, | ||
description | ||
FROM system.asynchronous_metrics | ||
WHERE metric IN ('MaxPartCountForPartition', 'Uptime') | ||
UNION ALL | ||
SELECT | ||
name, | ||
toFloat64(value) AS value, | ||
description | ||
FROM system.events | ||
WHERE event IN ( | ||
'RejectedInserts', | ||
'ReplicatedDataLoss', | ||
'DataAfterMergeDiffersFromReplica', | ||
'DataAfterMutationDiffersFromReplica' | ||
) | ||
UNION All | ||
SELECT | ||
'StuckReplicationTasks' AS name, | ||
toFloat64(count()) AS value, | ||
'Replication tasks that were retried or postponed over 100 times.' AS description | ||
FROM system.replication_queue | ||
WHERE num_tries > 100 OR num_postponed > 100 | ||
UNION ALL | ||
SELECT | ||
CONCAT('cluster ', name) AS name, | ||
ROUND(SUM(free_space) / SUM(total_space), 3) * 100 AS value, | ||
'Free space per cluster node, as percent' AS description | ||
FROM system.disks | ||
GROUP BY name | ||
params: null | ||
template_params: null | ||
filter_select_enabled: true | ||
fetch_values_predicate: null | ||
extra: null | ||
normalize_columns: false | ||
uuid: 9eee1df8-ad25-4d0f-8e53-90c277cf28e4 | ||
metrics: | ||
- metric_name: count | ||
verbose_name: COUNT(*) | ||
metric_type: count | ||
expression: COUNT(*) | ||
description: null | ||
d3format: null | ||
currency: null | ||
extra: | ||
warning_markdown: '' | ||
warning_text: null | ||
columns: | ||
- column_name: value | ||
verbose_name: null | ||
is_dttm: false | ||
is_active: true | ||
type: Float64 | ||
advanced_data_type: null | ||
groupby: true | ||
filterable: true | ||
expression: null | ||
description: null | ||
python_date_format: null | ||
extra: {} | ||
- column_name: name | ||
verbose_name: null | ||
is_dttm: false | ||
is_active: true | ||
type: String | ||
advanced_data_type: null | ||
groupby: true | ||
filterable: true | ||
expression: null | ||
description: null | ||
python_date_format: null | ||
extra: {} | ||
- column_name: description | ||
verbose_name: null | ||
is_dttm: false | ||
is_active: true | ||
type: String | ||
advanced_data_type: null | ||
groupby: true | ||
filterable: true | ||
expression: null | ||
description: null | ||
python_date_format: null | ||
extra: {} | ||
version: 1.0.0 | ||
database_uuid: 21174b6c-4d40-4958-8161-d6c3cf5e77b6 |