Skip to content
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

logs: fixes grafana dashboards to start referencing the new services #460

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 11 additions & 11 deletions observability/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ local thanos = (import '../services/observatorium-metrics.libsonnet').thanos;
local replacements = [
{ from: 'cluster=~"$cluster",', to: '' },
{ from: 'container="compactor"', to: 'container="observatorium-loki-compactor"' },
{ from: 'job=~"($namespace)/compactor"', to: 'job="observatorium-loki-compactor-http"' },
{ from: 'job=~"($namespace)/compactor"', to: 'job="observatorium-loki-compactor"' },
],
uid: 'RetCujSHzC8gd9i5fck9a3v9n2EvTzA',
tags: defaultLokiTags(super.tags),
Expand All @@ -183,7 +183,7 @@ local thanos = (import '../services/observatorium-metrics.libsonnet').thanos;
showMultiCluster:: false,
namespaceQuery:: 'label_values(kube_pod_info, namespace)',
namespaceType:: 'query',
labelsSelector:: 'job="observatorium-loki-ingester-http"',
labelsSelector:: 'job="observatorium-loki-ingester"',
// Adapt dashboard template parameters:
// - Match default selected datasource to RHOBS cluster.
// - Match namespaces to RHOBS cluster namespaces
Expand All @@ -203,9 +203,9 @@ local thanos = (import '../services/observatorium-metrics.libsonnet').thanos;
namespaceType:: 'query',
jobMatchers:: {
cortexgateway:: sjm.cortexgateway,
distributor:: [utils.selector.eq('job', 'observatorium-loki-distributor-http')],
ingester:: [utils.selector.eq('job', 'observatorium-loki-ingester-http')],
querier:: [utils.selector.eq('job', 'observatorium-loki-querier-http')],
distributor:: [utils.selector.eq('job', 'observatorium-loki-distributor')],
ingester:: [utils.selector.eq('job', 'observatorium-loki-ingester')],
querier:: [utils.selector.eq('job', 'observatorium-loki-querier')],
},
// Adapt dashboard panels to:
// - Use RHOBS related job label selectors instead of mixin defaults.
Expand All @@ -222,7 +222,7 @@ local thanos = (import '../services/observatorium-metrics.libsonnet').thanos;
{ from: 'pod=~"distributor.*"', to: 'pod=~".*distributor.*"' },
{ from: 'pod=~"ingester.*"', to: 'pod=~".*ingester.*"' },
{ from: 'pod=~"querier.*"', to: 'pod=~".*querier.*"' },
{ from: 'job=~"$namespace/ingester",', to: 'job="observatorium-loki-ingester-http",' },
{ from: 'job=~"$namespace/ingester",', to: 'job="observatorium-loki-ingester",' },
],
panels: mapPanels([replaceMatchers(replacements), withLatencyAxis], dropPanels(super.panels, dropList)),
// Adapt dashboard template parameters:
Expand All @@ -242,9 +242,9 @@ local thanos = (import '../services/observatorium-metrics.libsonnet').thanos;
namespaceType:: 'query',
matchers:: {
cortexgateway:: [],
queryFrontend:: [utils.selector.eq('job', 'observatorium-loki-query-frontend-http')],
querier:: [utils.selector.eq('job', 'observatorium-loki-querier-http')],
ingester:: [utils.selector.eq('job', 'observatorium-loki-ingester-http')],
queryFrontend:: [utils.selector.eq('job', 'observatorium-loki-query-frontend')],
querier:: [utils.selector.eq('job', 'observatorium-loki-querier')],
ingester:: [utils.selector.eq('job', 'observatorium-loki-ingester')],
ingesterZoneAware:: [],
querierOrIndexGateway:: [],
},
Expand All @@ -271,8 +271,8 @@ local thanos = (import '../services/observatorium-metrics.libsonnet').thanos;
namespaceType:: 'query',
matchers:: {
cortexgateway:: [],
distributor:: [utils.selector.eq('job', 'observatorium-loki-distributor-http')],
ingester:: [utils.selector.eq('job', 'observatorium-loki-ingester-http')],
distributor:: [utils.selector.eq('job', 'observatorium-loki-distributor')],
ingester:: [utils.selector.eq('job', 'observatorium-loki-ingester')],
ingester_zone:: [],
},
rows: dropPanels(super.rows, dropList),
Expand Down
2 changes: 1 addition & 1 deletion observability/observatorium-logs/loki-overview.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ function(datasource, namespace) {
uid: '${datasource}',
},
editorMode: 'code',
expr: 'sum by (route)(rate(loki_request_duration_seconds_count{namespace="$namespace",job=~".*loki-querier-http", route=~"loki_api_v1.*", status_code!~"5[0-9]{2}"}[1m]))\n/\nsum by (route)(rate(loki_request_duration_seconds_count{namespace="$namespace", job=~".*loki-querier-http", route=~"loki_api_v1.*"}[1m])) ',
expr: 'sum by (route)(rate(loki_request_duration_seconds_count{namespace="$namespace",job=~".*loki-querier", route=~"loki_api_v1.*", status_code!~"5[0-9]{2}"}[1m]))\n/\nsum by (route)(rate(loki_request_duration_seconds_count{namespace="$namespace", job=~".*loki-querier", route=~"loki_api_v1.*"}[1m])) ',
instant: false,
interval: '',
legendFormat: '__auto',
Expand Down
Loading