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

Add config options for loki dashboards #2617

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

periklis
Copy link
Collaborator

@periklis periklis commented Sep 11, 2020

What this PR does / why we need it:
This PR addresses missing reconfigurability for Loki dashboards. It provides the following options:

  1. Handle to enable/disable multi-cluster matchers.
  2. Custom matchers per component.

Dashboards to adapt:

  • Loki / Logs
  • Loki / Operational
  • Loki / Reads
  • Loki / Writes
  • Loki / Chunks
  • Loki / Promtail

Which issue(s) this PR fixes:
Fixes #1830 and supersedes #1978

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated

/cc @cyriltovena @slim-bean

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2020

Codecov Report

Merging #2617 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2617      +/-   ##
==========================================
+ Coverage   62.87%   62.90%   +0.02%     
==========================================
  Files         170      170              
  Lines       15049    15049              
==========================================
+ Hits         9462     9466       +4     
+ Misses       4826     4823       -3     
+ Partials      761      760       -1     
Impacted Files Coverage Δ
pkg/logql/evaluator.go 92.88% <0.00%> (+0.40%) ⬆️
pkg/querier/queryrange/downstreamer.go 97.93% <0.00%> (+2.06%) ⬆️

@periklis periklis force-pushed the loki-mixin-dashboards branch 2 times, most recently from f9958e7 to d6b589b Compare September 14, 2020 16:34
@periklis periklis changed the title WIP: Add config options for loki dashboards Add config options for loki dashboards Sep 14, 2020
@periklis periklis force-pushed the loki-mixin-dashboards branch 10 times, most recently from 7671891 to 14e1a6c Compare September 15, 2020 12:29
@periklis periklis changed the title Add config options for loki dashboards WIP: Add config options for loki dashboards Sep 15, 2020
@periklis periklis changed the title WIP: Add config options for loki dashboards Add config options for loki dashboards Sep 15, 2020
@periklis periklis force-pushed the loki-mixin-dashboards branch 6 times, most recently from 1718a52 to 215fc02 Compare September 16, 2020 12:19
Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jsonnet PRs are always hard to review, but this looks good. Left one nit/question, but LGTM.

assert (cfg.namespaceType == 'custom' || cfg.namespaceType == 'query') : "Only types 'query' and 'custom' are allowed for dashboard variable 'namespace'",

matchers:: {
ingester: [utils.selector.re('job', '($namespace)/ingester')],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think this can be an equality match instead of a regexp.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume so, but I kept the same selectors as previously used for now. It is already a massive change :)

@slim-bean slim-bean merged commit 899e8cc into grafana:master Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

more configurable job label in mixin
4 participants