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

Grafana angular deprecation in grafana 11 #898

Closed
NissesSenap opened this issue Mar 8, 2024 · 17 comments
Closed

Grafana angular deprecation in grafana 11 #898

NissesSenap opened this issue Mar 8, 2024 · 17 comments
Labels
help wanted Extra attention is needed

Comments

@NissesSenap
Copy link

Hey all

In Grafana 11, angular dashboards will be deprecated
https://grafana.com/docs/grafana/latest/developers/angular_deprecation

Grafana 10.4 just got released, and I bumped my grafana instances and all of K8s mixins shows warnings that it's time to move away from the old Graph solution.

image

image

In short, we need to update our panels, or it will become a blocker to upgrade to grafana 11 when that gets released during GrafanCon in April.

@NissesSenap
Copy link
Author

Sadly, I never learned jsonnet, so I don't feel I can help out with the issue.

@povilasv povilasv added the help wanted Extra attention is needed label Mar 8, 2024
@jkroepke
Copy link
Contributor

In short, we need to update our panels, or it will become a blocker to upgrade to grafana 11 when that gets released during GrafanCon in April.

It's not an blocker. You can already disable AngularJS in grafana via security.angular_support_enabled = false which triggers the auto migration of the table panel.

@NissesSenap
Copy link
Author

I did, not know that @jkroepke , that is really good to know.
But the most beautiful solution, but if it works it's great. Might be worth documenting as a workaround.

@jkroepke
Copy link
Contributor

But the most beautiful solution, but if it works it's great.

Important to mention is that deep links wont work anymore. At kube-promethues-stack, we implement a toggle that fixes deeplinks on auto-migrated table panels.

Ref: #884

@marians
Copy link
Contributor

marians commented Mar 14, 2024

What is the proper way to migrate the panels here in the repo?

In https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/release-0.12/dashboards/resources/namespace.libsonnet#L163 for example I see the queryPanel function from github.com/grafana/jsonnet-libs/grafana-builder/grafana.libsonnet called. Does that function have to be updated then?

Or do we have to migrate from queryPanel to timeseriesPanel?

And if tablePanel produces a deprecated result, what is the replacement for that?

@marians
Copy link
Contributor

marians commented Mar 14, 2024

I just found #890 by @Duologic which already migrated time series and stat panels in https://github.com/Duologic/kubernetes-mixin/blob/master/dashboards/apiserver.libsonnet

@DrFaust92
Copy link

@jkroepke are you sure it will be auto migrated with https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#angular_support_enabled? it seems it will just make it not load according to docs

@jkroepke
Copy link
Contributor

jkroepke commented Mar 28, 2024

Yeah, people confirm it: prometheus-community/helm-charts#4398 (comment)

I'm also running Grafana instances with [angular_support_enabled](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#angular_support_enabled). The issue is that deep-links are not migrated well and we have provide a fix for that: prometheus-community/helm-charts#4297

Source reference: https://github.com/grafana/grafana/blob/648abdbd0ea4451a102601dec874c770d635eb12/public/app/features/dashboard/state/DashboardModel.ts#L172-L174

@skl
Copy link
Collaborator

skl commented Apr 8, 2024

👋 here's the 2nd dashboard to be ported, as far as I'm aware, reviews and comments welcome!

@skl
Copy link
Collaborator

skl commented Apr 19, 2024

👋 number 3:

@EvertonSA
Copy link

thanks a lot to all working on this, if there is something i can help, please tag me

@skl
Copy link
Collaborator

skl commented May 3, 2024

I think this issue can be closed with the final dashboards ported here:

Many thanks to @Duologic and @rgeyer for contributing and for @povilasv for handling all the reviews and merging! Thanks also to the people commenting on this thread, it was a great point of reference to see everything in one place ❤️

@ehddnko
Copy link

ehddnko commented May 13, 2024

Hello @skl,

First of all thank you for updating the dashboards.

I am encountering an issue with the 'Current Network Usage' panel in the cluster dashboard (dashboards/resources/cluster.libsonnet). It displays 'No data,' as shown in the screenshot below.
image

I can retrieve results when I run the query sum(rate(container_network_receive_bytes_total{job="cadvisor", cluster="test-cluster", namespace=~".+"}[$__rate_interval])) by (namespace) in the range type, but I get no results in the instant type.

Could you point me to where I should start debugging this issue?

@skl
Copy link
Collaborator

skl commented May 13, 2024

@ehddnko make sure that you have set the correct scrape interval to match your data in Grafana > Connections > Data sources > (your Prometheus data source) > Settings > Advanced Settings > Internal Behavior > Scrape interval (e.g. I have set mine to 60s).

Grafana needs this information to be set manually in order for $__rate_interval to work correctly, as it cannot be discovered automatically by the data source.

Screenshot 2024-05-13 at 13 11 45

More info here:

@ehddnko
Copy link

ehddnko commented May 14, 2024

@skl Thank you for your advice! I found that the scrape interval was set to 15s in the Mimir data source. After changing this scrape interval, it works correctly.

@skl
Copy link
Collaborator

skl commented Jun 12, 2024

@povilasv can this issue be closed to indicate it's resolved? As it's now being referenced by dependent projects experiencing the same.

@jkroepke
Copy link
Contributor

Close it!

Upcoming bugs can be a individual issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

8 participants