Ensure that all dashboards are using 'defaults.datasource'
Some dashboards were still explicitly specifying 'Prometheus' as the
datasource, which leads to issues when trying to import the dashboards
into a grafana instance where the prometheus datasource has a different
name.
Change-Id: I13135af32a6f312a4feb32ab828f906f7b13edfe
This commit is contained in:
parent
8e8a55e650
commit
37dc340371
|
@ -37,7 +37,7 @@ dashboard.new(
|
|||
.addTemplate(
|
||||
template.new(
|
||||
name='check',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
query='metrics(^plugins_healthcheck_.+_failure_total$)',
|
||||
regex='plugins_healthcheck_(.+)_failure_total',
|
||||
label='Check',
|
||||
|
|
|
@ -27,7 +27,7 @@ dashboard.new(
|
|||
.addTemplate(
|
||||
template.new(
|
||||
name='endpoint',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
query='metrics(^http_server_rest_api_server_latency_restapi_.+$)',
|
||||
regex='^http_server_rest_api_server_latency_restapi_([^_]+)_.+$',
|
||||
label='Endpoint',
|
||||
|
@ -37,7 +37,7 @@ dashboard.new(
|
|||
.addTemplate(
|
||||
template.new(
|
||||
name='action',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
query='metrics(^http_server_rest_api_server_latency_restapi_$endpoint.+$)',
|
||||
regex='^http_server_rest_api_server_latency_restapi_[^_]+_([^_]+)_.+$',
|
||||
label='Action',
|
||||
|
|
|
@ -27,7 +27,7 @@ dashboard.new(
|
|||
.addTemplate(
|
||||
template.new(
|
||||
name='action',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
query='metrics(^http_server_rest_api_ui_actions_latency_[^_]+$)',
|
||||
regex='^http_server_rest_api_ui_actions_latency_(.+)$',
|
||||
label='Action',
|
||||
|
|
|
@ -2,9 +2,11 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
|
|||
local prometheus = grafana.prometheus;
|
||||
local stat = grafana.singlestat;
|
||||
|
||||
local defaults = import '../../../globals/defaults.libsonnet';
|
||||
|
||||
stat.new(
|
||||
title='Gerrit Availability [last 24h]',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
colorBackground=true,
|
||||
colors=[
|
||||
"red",
|
||||
|
|
|
@ -2,9 +2,11 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
|
|||
local prometheus = grafana.prometheus;
|
||||
local gauge = grafana.gaugePanel;
|
||||
|
||||
local defaults = import '../../../globals/defaults.libsonnet';
|
||||
|
||||
gauge.new(
|
||||
title='CPU Usage',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
)
|
||||
.addTarget(
|
||||
target=prometheus.target(
|
||||
|
|
|
@ -2,9 +2,11 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
|
|||
local prometheus = grafana.prometheus;
|
||||
local gauge = grafana.gaugePanel;
|
||||
|
||||
local defaults = import '../../../globals/defaults.libsonnet';
|
||||
|
||||
gauge.new(
|
||||
title='Heap Memory Usage',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
)
|
||||
.addTarget(
|
||||
target=prometheus.target(
|
||||
|
|
|
@ -2,9 +2,11 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
|
|||
local prometheus = grafana.prometheus;
|
||||
local gauge = grafana.gaugePanel;
|
||||
|
||||
local defaults = import '../../../globals/defaults.libsonnet';
|
||||
|
||||
gauge.new(
|
||||
title='HTTP Request Error Rate (last 5 min)',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
description='Excludes 404 and 401, since these error codes are caused by client behaviour and are overrepresented in the data.',
|
||||
min=0,
|
||||
max=100,
|
||||
|
|
|
@ -2,9 +2,11 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
|
|||
local prometheus = grafana.prometheus;
|
||||
local gauge = grafana.gaugePanel;
|
||||
|
||||
local defaults = import '../../../globals/defaults.libsonnet';
|
||||
|
||||
gauge.new(
|
||||
title='REST API latency (0.99 quantile)',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
unit='ms',
|
||||
min=0,
|
||||
max=50,
|
||||
|
|
|
@ -2,9 +2,11 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
|
|||
local prometheus = grafana.prometheus;
|
||||
local gauge = grafana.barGaugePanel;
|
||||
|
||||
local defaults = import '../../../globals/defaults.libsonnet';
|
||||
|
||||
gauge.new(
|
||||
title='Live Threads',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
thresholds=[{
|
||||
color: 'green',
|
||||
value: null,
|
||||
|
|
|
@ -2,9 +2,11 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
|
|||
local prometheus = grafana.prometheus;
|
||||
local table = grafana.tablePanel;
|
||||
|
||||
local defaults = import '../../../globals/defaults.libsonnet';
|
||||
|
||||
table.new(
|
||||
title='Gerrit Version',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
transform='table',
|
||||
transparent=false,
|
||||
)
|
||||
|
|
|
@ -27,7 +27,7 @@ dashboard.new(
|
|||
.addTemplate(
|
||||
template.new(
|
||||
name='target',
|
||||
datasource='Prometheus',
|
||||
datasource=defaults.datasource,
|
||||
query='metrics(plugins_replication_replication_latency_.*_count)',
|
||||
regex='^plugins_replication_replication_latency_(.*)_count$',
|
||||
label='Replication Target',
|
||||
|
|
Loading…
Reference in a new issue