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

loki-mixin: Remove logmetrics and use loki for logs count #2937

Closed
wants to merge 1 commit into from

Conversation

MrFreezeex
Copy link

@MrFreezeex MrFreezeex commented Nov 15, 2020

Signed-off-by: Arthur Outhenin-Chalandre arthur@cri.epita.fr

What this PR does / why we need it:
I think that the log count should be computed from loki instead of prometheus because:

  • there is a $filter at the end of the query and this should be a logql filter AFAIK
  • there is no metric name on the query

So the PR removes the "logmetrics" input and uses the loki input ($logs) to get the log count.
I may have misunderstood the reason to use a prometheus input instead of loki for this, do not hesitate if I'm wrong :).

Signed-off-by: Arthur Outhenin-Chalandre <arthur@cri.epita.fr>
@CLAassistant
Copy link

CLAassistant commented Nov 15, 2020

CLA assistant check
All committers have signed the CLA.

@codecov-io
Copy link

Codecov Report

Merging #2937 (b6e1331) into master (78bb4bc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2937   +/-   ##
=======================================
  Coverage   61.74%   61.74%           
=======================================
  Files         181      181           
  Lines       14711    14711           
=======================================
  Hits         9084     9084           
  Misses       4796     4796           
  Partials      831      831           

@owen-d
Copy link
Member

owen-d commented Nov 24, 2020

I wasn't even aware of this dashboard. I took a look at it and there's a few references to things which are pretty old (such as logmetrics, which insinuates the last update to this dashboard was before grafana could treat loki as a metrics datasource without loading it as a prometheus datasource -- an early hack). I think it might be more pertinent to remove this dashboard entirely.

@MrFreezeex
Copy link
Author

I wasn't even aware of this dashboard. I took a look at it and there's a few references to things which are pretty old (such as logmetrics, which insinuates the last update to this dashboard was before grafana could treat loki as a metrics datasource without loading it as a prometheus datasource -- an early hack). I think it might be more pertinent to remove this dashboard entirely.

Oh ok, we actually started to use it since recently and I find It pretty useful except this small problem and the fact that we can't select multiple pods/namespace/..., but if I recall correctly this is also a pretty simple fix.

I can understand the reason to remove It if it's not really used/maintained...

@owen-d
Copy link
Member

owen-d commented Nov 24, 2020

Hrm, that's fair. Have you tested these changes? I'm not opposed to merging this if it's helpful. On an unrelated note, I think we could benefit from combing through our dashboards and

  1. Make them more open source friendly (remove references to the internal job label we use, etc).
  2. Move some of our internal dashboards into the Loki repo (Ruler, upcoming WAL).

@MrFreezeex
Copy link
Author

Hrm, that's fair. Have you tested these changes?

Yes, the graph does work correctly with this change.

1. Make them more open source friendly (remove references to the internal `job` label we use, etc).

2. Move some of our internal dashboards into the Loki repo (Ruler, upcoming WAL).

That would be awesome! :D

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Dec 25, 2020
@stale stale bot closed this Jan 2, 2021
cyriltovena pushed a commit to cyriltovena/loki that referenced this pull request Jun 11, 2021
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S stale A stale issue or PR that will automatically be closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants