-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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: Complex configuration needed compared to other mixins #4838
Comments
Hey, thanks a lot for this, I have hit the same problem with loki-mixin not being suitable for loki-distributed out of the box. |
Hi! This issue has been automatically marked as stale because it has not had any We use a stalebot among other tools to help manage the state of issues in this project. Stalebots are also emotionless and cruel and can close issues which are still very relevant. If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry. We regularly sort for closed issues which have a We may also:
We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task, |
Dear stalebot. Please keep this issue open.
…________________________________
From: stale[bot] ***@***.***>
Sent: Wednesday, March 2, 2022 9:49:47 PM
To: grafana/loki ***@***.***>
Cc: David Heinrich ***@***.***>; Mention ***@***.***>
Subject: Re: [grafana/loki] loki-mixin: Complex configuration needed compared to other mixins (Issue #4838)
Hi! This issue has been automatically marked as stale because it has not had any
activity in the past 30 days.
We use a stalebot among other tools to help manage the state of issues in this project.
A stalebot can be very useful in closing issues in a number of cases; the most common
is closing issues or PRs where the original reporter has not responded.
Stalebots are also emotionless and cruel and can close issues which are still very relevant.
If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry.
We regularly sort for closed issues which have a stale label sorted by thumbs up.
We may also:
* Mark issues as revivable if we think it's a valid issue but isn't something we are likely
to prioritize in the future (the issue will still remain closed).
* Add a keepalive label to silence the stalebot if the issue is very common/popular/important.
We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task,
our sincere apologies if you find yourself at the mercy of the stalebot.
—
Reply to this email directly, view it on GitHub<#4838 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE77SLP42C5LUPAJKVC36R3U57H6XANCNFSM5I6Z4A6A>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I override the almost complete dashboard definition to work here. I did need to review and adapt some dashboards, in my perspective not so clearly this loki-mixin.
Extra:
|
the
|
Hi! This issue has been automatically marked as stale because it has not had any We use a stalebot among other tools to help manage the state of issues in this project. Stalebots are also emotionless and cruel and can close issues which are still very relevant. If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry. We regularly sort for closed issues which have a We may also:
We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task, |
Dear stale bot. Please keep this issue open. |
@DaveOHenry I'm hitting the same issue with the mixins. Why not filing a PR with the suggested updates for jsonnet? |
I guess it's not as easy as it sounds, because there are many different functions and techniques used in the various dashboards. I literally spent hours trying to figure out how the mixin is supposed to work, but still don't know jsonnet good enough to implement the needed changes. |
It took me a lot to make it work in jsonnet too, but a PR is good to discuss about the changes and get these overrides to a point that could be useful for everyone. |
Unfortunately the overrides are quite limited here. There are some cases in this mixin where one has to override complete dashboard definitions. This means that one cannot simply update the mixin afterwards anymore. Instead the overrides have to be updated as well. This kind of defeats the purpose of a mixin, because they were meant to be easily portable and consumable as far as I know.
…________________________________
From: irizzant ***@***.***>
Sent: Tuesday, May 17, 2022 5:13:46 PM
To: grafana/loki ***@***.***>
Cc: David Heinrich ***@***.***>; Mention ***@***.***>
Subject: Re: [grafana/loki] loki-mixin: Complex configuration needed compared to other mixins (Issue #4838)
It took me a lot to make it work in jsonnet too, but a PR is good to discuss about the changes and get these overrides to a point that could be useful for everyone.
—
Reply to this email directly, view it on GitHub<#4838 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE77SLPWYXHWXWS46DJDDX3VKOZSVANCNFSM5I6Z4A6A>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Please have a look at #6189, it's the same setup I'm currently using and the dashboards are working fine. |
Looks like the linked PR #6189 does not fix anything related to this issue. There is still a lot of tweaking needed to make the mixin work and there is no hint for the user how to configure these kind of things. However, some improvements were made in other PRs, namely: ... but the job name in many queries is still hardcoded to something like "($namespace)/$job" or "$namespace/compactor" and I also saw a hardcoded "cluster" label somewhere. I'll try to take a closer look if time permits. |
The linked PR #6189 implies that:
so it actually does address the problems reported in this issue |
How can a ServiceMonitor object possibly configure the selectors in the loki-mixin for me? I also don't use jsonnet to deploy Loki. So it actually does not fix anything in my case 😢 |
The ServiceMonitor object can very well make the existing dashboards selectors work out-of-the-box without adding any of the jsonnet you reported above, and indeed it's already doing this job in our current setup. Of course it involves using Jsonnet (which is by the way the recommended installation method) but the very same principle can be applied with to a ServiceMonitor generated by a Helm chart. |
I understand your point, but the users should not be forced to build their infrastructure around a mixin. It should be configurable and easily consumable. That‘s what mixins were made for in the first place.
Just take a look at the thanos or kubernetes mixins. They are easily configurable. It takes a few minutes to set the correct selectors and everything is just working. These mixins do not care if you use jsonnet, Helm or any other method for deploying your infrastructure.
|
Actually all mixins (thanos included) make use of jsonnet only and they do not provide any valid PrometheusRule or ConfigMap directly applicable to a k8s cluster. Given the compiled manifests, it shouldn't be a problem to include them in Helm charts and also add a ServiceMonitor which computes the right labeling to make Grafana dashboards work as expected. I'll see if I have some time to work on this too and file a PR |
Most people do not care how these mixins are written. They just need a config file, install a tool and execute 1-2 commands to generate the manifests. See also https://monitoring.mixins.dev I agree that the ServiceMonitor route works for some cases, but most people have a defined set of labels for all of their applications and they certainly do not want to change that just for this single mixin. |
I agree, but this depends on the way you use the mixins: if you use jsonnet you can import and use jsonnet directly, if you use Helm you first have to generate the manifests.
I can't see how the ServiceMonitor labeling done in the PR could impact the existing set of labels for their applications at all.
Then they will need custom tools to inject Rules and Alerts into Prometheus yaml configuration anyway. I totally agree that mixins should be easy to use and, compared to the way it was before, they are now for jsonnet users. |
We are using Helm and there are currently quite a few things that have to be tweaked to make the dashboards work:
showMultiCluster:: false
forloki-logs.json
andloki-operational.json
clusterLabel::
andmatchers::
for every dashboard that uses these fieldscluster
andnamespace
)jobMatcher(job)::
andnamespaceMatcher()::
functions (currently used by loki-deletion.json, loki-reads-resources.json, loki-retention.json and loki-writes-resources.json)To summarize my findings:
loki-reads-resources.json
andloki-writes-resources.json
work other than overriding the complete dashboard definition, but this would kind of defeat the purpose of a mixin, wouldn't it?cortex-gw
is. Never heard of it before and ignored it for now.I'm not using the
loki-deletes.json
andloki-mixin-recording-rules.json
dashboards currently, but the others are mostly working and are a great starting point to explore various aspects of Loki.My jsonnet experience is pretty basic, but I still hope that this
config.libsonnet
overrides help some people to get started more quickly and maybe save some headaches:Originally posted by @DaveOHenry in #1978 (comment)
The text was updated successfully, but these errors were encountered: