grafana: update grafana dashboard provision schema

This commit is contained in:
Astro 2022-10-28 00:47:00 +02:00
parent e44586403e
commit a8d083274d
1 changed files with 10 additions and 2 deletions

View File

@ -41,8 +41,16 @@ in {
datasources.settings.datasources = map (datasource: {
inherit (datasource) name type access orgId url password user database isDefault jsonData;
}) (with builtins; fromJSON (readFile ./datasources.json));
# for id in `curl https://root:SECRET@grafana.hq.c3d2.de/api/search | jq -j 'map(.uid) | join(" ")'`; do curl https://root:SECRET@grafana.hq.c3d2.de/api/dashboards/uid/$id | jq .dashboard > hosts/grafana/dashboards/$id.json;done
dashboards.path = ./dashboards;
dashboards = [ {
settings = {
apiVersion = 1;
providers = [ {
name = "c3d2";
} ];
};
# for id in `curl https://root:SECRET@grafana.hq.c3d2.de/api/search | jq -j 'map(.uid) | join(" ")'`; do curl https://root:SECRET@grafana.hq.c3d2.de/api/dashboards/uid/$id | jq .dashboard > hosts/grafana/dashboards/$id.json;done
options.path = ./dashboards;
} ];
};
settings = {