1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-16 07:04:25 +00:00
gitea/contrib/gitea-monitoring-mixin
Emily 7a0f2fb1dc
Fixed lint warnings in Grafana raised by Mixtool (#22486)
This PR introduces a few minor changes to the gitea-monitoring-mixin,
specifically linting issues raised by
[Mixtool](https://github.com/monitoring-mixins/mixtool):
- Query selectors using `job` and `instance` have been update to allow
multi-select
- Added missing attributes to `job` and `instance` template

As this change is very minor I haven't created an issue, but please let
me know if you'd like me to do so. According to the guidelines, it
seemed to only be for larger designs :)
2023-01-17 10:23:25 -06:00
..
dashboards Fixed lint warnings in Grafana raised by Mixtool (#22486) 2023-01-17 10:23:25 -06:00
lib Add grafana gitea-mixin (#17758) 2021-12-20 07:52:33 +00:00
.gitignore Add grafana gitea-mixin (#17758) 2021-12-20 07:52:33 +00:00
config.libsonnet Add grafana gitea-mixin (#17758) 2021-12-20 07:52:33 +00:00
jsonnetfile.json Add grafana gitea-mixin (#17758) 2021-12-20 07:52:33 +00:00
jsonnetfile.lock.json Add grafana gitea-mixin (#17758) 2021-12-20 07:52:33 +00:00
Makefile Add grafana gitea-mixin (#17758) 2021-12-20 07:52:33 +00:00
mixin.libsonnet Add grafana gitea-mixin (#17758) 2021-12-20 07:52:33 +00:00
README.md Add grafana gitea-mixin (#17758) 2021-12-20 07:52:33 +00:00

Gitea Mixin

Gitea Mixin is a set of configurable Grafana dashboards based on the metrics exported by the Gitea built-in metrics endpoint.

Generate config files

You can manually generate dashboards, but first you should install some tools:

go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
go install github.com/google/go-jsonnet/cmd/jsonnet@latest
# or in brew: brew install go-jsonnet

For linting and formatting, you would also need mixtool and jsonnetfmt installed. If you have a working Go development environment, it's easiest to run the following:

go install github.com/monitoring-mixins/mixtool/cmd/mixtool@latest
go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest

The files in dashboards_out need to be imported into your Grafana server. The exact details will be depending on your environment.

Edit config.libsonnet if required and then build JSON dashboard files for Grafana:

make

For more advanced uses of mixins, see https://github.com/monitoring-mixins/docs.