Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove logs from mixin in favior of logs lib
  • Loading branch information
gaantunes committed Oct 10, 2023
commit 7bc76c1843669353d2a631885ec27c7e96b0386e
3 changes: 0 additions & 3 deletions clickhouse-mixin/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@

// for alerts
alertsReplicasMaxQueueSize: '99',

// enable Loki logs
enableLokiLogs: true,
},
}
52 changes: 2 additions & 50 deletions clickhouse-mixin/dashboards/clickhouse-overview.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -791,39 +791,6 @@ local networkTransmittedPanel =
type: 'timeseries',
};

local errorLogsPanel =
{
datasource: {
type: 'loki',
uid: '${loki_datasource}',
},
description: 'Recent logs from the error log file',
options: {
dedupStrategy: 'none',
enableLogDetails: true,
prettifyLogMessage: false,
showCommonLabels: false,
showLabels: false,
showTime: false,
sortOrder: 'Descending',
wrapLogMessage: false,
},
targets: [
{
datasource: {
type: 'loki',
uid: '${loki_datasource}',
},
editorMode: 'builder',
expr: '{filename="/var/log/clickhouse-server/clickhouse-server.err.log", %s}' % matcher,
legendFormat: '',
queryType: 'range',
refId: 'A',
},
],
title: 'Error logs',
type: 'logs',
};
{
grafanaDashboards+:: {

Expand Down Expand Up @@ -856,18 +823,7 @@ local errorLogsPanel =
regex: '',
type: 'datasource',
},
],
if $._config.enableLokiLogs then [
{
hide: 0,
label: 'Loki datasource',
name: 'loki_datasource',
query: 'loki',
refresh: 1,
regex: '',
type: 'datasource',
},
] else [],
],
[
template.new(
name='job',
Expand Down Expand Up @@ -916,11 +872,7 @@ local errorLogsPanel =
[
networkReceivedPanel { gridPos: { h: 8, w: 12, x: 0, y: 32 } },
networkTransmittedPanel { gridPos: { h: 8, w: 12, x: 12, y: 32 } },
],
//next row
if $._config.enableLokiLogs then [
errorLogsPanel { gridPos: { h: 8, w: 24, x: 0, y: 40 } },
] else [],
],
])
),
},
Expand Down