-
Notifications
You must be signed in to change notification settings - Fork 170
Update ClickHouse mixin to better utilize libraries #1445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing! Small comment below while still a draft.
panels.interserverConnectionsPanel { gridPos+: { h: 8, w: 12, x: 0, y: 0 } }, | ||
panels.replicaQueueSizePanel { gridPos+: { h: 8, w: 12, x: 12, y: 0 } }, | ||
panels.replicaOperationsPanel { gridPos+: { h: 8, w: 12, x: 0, y: 8 } }, | ||
panels.replicaReadOnlyPanel { gridPos+: { h: 8, w: 12, x: 12, y: 8 } }, | ||
panels.zooKeeperWatchesPanel { gridPos+: { h: 8, w: 12, x: 0, y: 16 } }, | ||
panels.zooKeeperSessionsPanel { gridPos+: { h: 8, w: 12, x: 12, y: 16 } }, | ||
panels.zooKeeperRequestsPanel { gridPos+: { h: 8, w: 24, x: 0, y: 24 } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x,y coordinates pair is redundant if wrapPanels is used. It will be calculated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet thank you for the tip! 🚀
…t-libs into clickhouse-modernization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Some comments inline.
new(panels): { | ||
row_1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like rows are not used to build dashboards.
'rate(ClickHouseProfileEvents_RejectedInserts{%s}[$__rate_interval])' % selector | ||
) | ||
+ g.panel.timeSeries.queryOptions.withInterval('30s') | ||
+ prometheusQuery.withLegendFormat('%s - Rejected Inserts' % utils.labelsToPanelLegend(config.legendLabels)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ prometheusQuery.withLegendFormat('%s - Rejected Inserts' % utils.labelsToPanelLegend(config.legendLabels)), | |
+ prometheusQuery.withLegendFormat('%s - Rejected Inserts' % utils.labelsToPanelLegend(config.legendLabels)), |
here and multiple places.
Please use Sentence case.
ClickHouseProfileEvents_DiskReadElapsedMicroseconds: | ||
prometheusQuery.new( | ||
'${' + vars.datasources.prometheus.name + '}', | ||
'increase(ClickHouseProfileEvents_DiskReadElapsedMicroseconds{%s}[$__rate_interval])' % selector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'increase(ClickHouseProfileEvents_DiskReadElapsedMicroseconds{%s}[$__rate_interval])' % selector | |
'increase(ClickHouseProfileEvents_DiskReadElapsedMicroseconds{%s}[$__rate_interval])' % selector |
to get accurate increments, Increase() should be used with [$__interval:] -offset $__interval
.
rate() is best used with $__rate_interval, but it gives per second ratio.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this whole file could be ommited. Its contents could generated with commonlib.variables.new()
"remote": "https://github.com/grafana/jsonnet-libs.git", | ||
"subdir": "grafana-cloud-integration-utils" | ||
"remote": "https://github.com/grafana/grafonnet.git", | ||
"subdir": "gen/grafonnet-v10.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"subdir": "gen/grafonnet-v10.0.0" | |
"subdir": "gen/grafonnet-v11.0.0" |
best to use v11.
local panels = this.grafana.panels; | ||
|
||
{ | ||
'clickhouse-replica': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'clickhouse-replica': | |
'clickhouse-replica.json': |
.json suffix should be used for dashboards.
_config+:: { | ||
enableMultiCluster: false, | ||
clickhouseSelector: if self.enableMultiCluster then 'job=~"$job", instance=~"$instance", cluster=~"$cluster"' else 'job=~"$job", instance=~"$instance"', | ||
enableMultiCluster: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enableMultiCluster: false, | |
enableMultiCluster: false, |
overall, I think cluster could be considered a specific case of a member of groupLabel. Do we need any specific support for clusterLabel?
local utils = commonlib.utils { | ||
labelsToPanelLegend(labels): std.join(' - ', ['{{%s}}' % [label] for label in labels]), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this function is present in commonlib.utils now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to transform targets to signals?
common-lib
,logs-lib
andgrafonnet
for most of the mixin generationWe need to retake some screenshots I believe for this update as now logs are utilizing the logs-lib and will be on a separate dashboard now instead of baked into the overview.
Clickhouse Overview

Clickhouse Latency

Clickhouse replica

Logs
