varnish-operator icon indicating copy to clipboard operation
varnish-operator copied to clipboard

Provide alternative ways to get grafana dashboard

Open arthurzenika opened this issue 3 years ago • 3 comments

Hi :wave:

Great to see that there is a way to deploy a grafana dashboard https://ibm.github.io/varnish-operator/monitoring.html for the varnish-operator.

It would be nice to have a "I already have a grafana somewhere else" option with the json one could copy/paste to create the dashboard. Or even publish the said json on https://grafana.com/grafana/dashboards

arthurzenika avatar Jun 10 '21 16:06 arthurzenika

Tried to copy paste the json found in https://github.com/IBM/varnish-operator/blob/main/varnish-operator/templates/grafana-dashboard.yaml#L11 (without the first 10 lines). Not sure what I was doing but tried to cut out the bits that we're considered json by my editor and then created the dashboard. It creates it, need to figure out why it's not showing data yet.

arthurzenika avatar Jun 10 '21 16:06 arthurzenika

You may want to try rendering the template with Helm (helm template) so that all of the template replacement happens. Just be sure to feed it the right values (like the release name) so that it will name things properly.

allen-servedio avatar Jun 10 '21 21:06 allen-servedio

Hello, glad to see it's being useful!

So there are two dashboards the operator can deploy:

  1. Operator dashboard, that shows how the operator (not the VarnishCluster) operates (memory, cpu usage, etc). It is deployed with the helm chart and you should be able to extract it in the way Allen suggests.
  2. VarnishCluster dashboards that show metrics for the deployed clusters. They are deployed by the operator's code per cluster. It is also templated so just copy/paste won't work. But you can deploy a cluster with the dashboard enabled in the spec and it will create a configMap with the final json file. You can use it to extract the dashboard and modify to your needs.

That's for the time being. Meanwhile we'll consider a way to provide those dashboards in a more convenient way for such use cases.

tomashibm avatar Jun 15 '21 18:06 tomashibm