9 Commits

Author SHA1 Message Date
Ian Wienand
7745bf16f3 grafana: proxy websockets
If you watch the web console of your browser in a grafana page, it
constantly tries to hit /api/live/ws which is currently giving an
error.

Following some combination of [1], [2], [3] and some trial-and-error,
this appears to let apache proxy through the requests.

[1] https://github.com/grafana/grafana/issues/36929
[2] https://github.com/grafana/grafana/issues/34537
[3] https://grafana.com/tutorials/run-grafana-behind-a-proxy/

Change-Id: I6c5ba71a1c0feab36b4df56f80271fa52f6354de
2022-03-10 12:49:56 +11:00
Ian Wienand
50600f49a2 grafana: set custom home dashboard
Set a home dashboard with a little logo, link to the source files and
a plain list of dashboards.

Change-Id: Ifa9373695c1edb7de83b342948d46a816702ee10
2022-03-07 12:45:03 +11:00
Ian Wienand
70c1fb2dff grafana: update docs and make an import script
Update the docs to reflect not having grafyaml in the container.

Also move the import into a separate helper script, which can be
manually run on the host if the container needs to be restarted
out-of-band for some reason.

Change-Id: Ib1f6aea7e16180d9b122552a2aa30ce223426941
2022-01-25 14:18:04 +11:00
Ian Wienand
9c17f9f7f0 grafana: update to oss latest release
It seems the images have split into enterprise and oss releases.  The
OSS release is the one we want.

Since If0d584f848f213aeea385885e3decfaee6303de5 we don't run anything
in the container.  So we can switch to the upstream default of the
Alpine-based container, which is their reccommendation.

Just use the :latest tag.  Generally the API seems pretty stable.  If
we do break, it's better to figure it out quickly rather than pin to
an old version and then have to make huge jumps.

Depends-On: https://review.opendev.org/c/opendev/grafyaml/+/825990
Change-Id: I312a141baf73d750591957197cb5ba829f503fcb
2022-01-24 12:52:06 +11:00
James E. Blair
1492f22faa Use grafyaml container image
Instead of building a local grafana image with grafyaml installed,
use the plain upstream grafana image along with the newly created
separate opendev grafyaml image to run the dashboards.

Depends-On: https://review.opendev.org/780119
Change-Id: If0d584f848f213aeea385885e3decfaee6303de5
2022-01-20 09:25:00 +11:00
Ian Wienand
7577439ff8 grafana: update to 7.4.2
This includes a fix for I216528a76307189d8d87bd2fcfeff95c6ceb53cc.
Now it's released we can be a bit more explicit about why we added the
workaround.

Change-Id: Ibaf1850549b5e7ec3622418b650bc5e59a289ab6
2021-02-19 09:54:31 +11:00
Ian Wienand
c7de005738 grafana: ensure snapshots api returns a 403
Change-Id: I216528a76307189d8d87bd2fcfeff95c6ceb53cc
2021-02-15 17:01:15 +11:00
Ian Wienand
99ee86bce5 grafana: redirect http to CNAME
Currently the http site redirects to https://grafana01.opendev.org
which is a bit confusing.  Change this to redirect to the CNAME
grafana.opendev.org.

Change-Id: I174ce06af036a8f74ace6b4d95edaaf85f63fa27
2020-11-05 13:27:09 +11:00
Ian Wienand
b146181174 Grafana container deployment
This uses the Grafana container created with
Iddfafe852166fe95b3e433420e2e2a4a6380fc64 to run the
grafana.opendev.org service.

We retain the old model of an Apache reverse-proxy; it's well tested
and understood, it's much easier than trying to map all the SSL
termination/renewal/etc. into the Grafana container and we don't have
to convince ourselves the container is safe to be directly web-facing.

Otherwise this is a fairly straight forward deployment of the
container.  As before, it uses the graph configuration kept in
project-config which is loaded in with grafyaml, which is included in
the container.

Once nice advantage is that it makes it quite easy to develop graphs
locally, using the container which can talk to the public graphite
instance.  The documentation has been updated with a reference on how
to do this.

Change-Id: I0cc76d29b6911aecfebc71e5fdfe7cf4fcd071a4
2020-07-03 07:17:22 +10:00