fix: failure to provision

This commit is contained in:
Noah Masur 2023-08-05 13:03:17 +00:00
parent 3cff7e090c
commit de1337bf58

View File

@ -1,7 +1,7 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
promUid = "f4988a80-680a-4f15-ad2d-2732159f6f63"; promUid = "victoriametrics";
in { in {
@ -16,18 +16,19 @@ in {
}; };
provision = { provision = {
enable = true; enable = true;
datasources.settings = [{ datasources.settings.datasources = [{
name = "VictoriaMetrics"; name = "VictoriaMetrics";
type = "prometheus"; type = "prometheus";
access = "direct"; access = "proxy";
url = url =
"http://localhost${config.services.victoriametrics.listenAddress}"; "http://localhost${config.services.victoriametrics.listenAddress}";
uid = promUid; uid = promUid;
}]; }];
dashboards.settings.providers = [{ dashboards.settings.providers = [{
name = "default"; name = "test";
options.path = type = "file";
builtins.toPath (pkgs.formats.yaml { }).generate "grafana.yml" { options.path = "${
(pkgs.writeTextDir "dashboards/dashboard.json" (builtins.toJSON {
annotations = { annotations = {
list = [{ list = [{
builtIn = 1; builtIn = 1;
@ -473,8 +474,8 @@ in {
uid = promUid; uid = promUid;
}; };
editorMode = "code"; editorMode = "code";
"expr" = "expr" = ''
''zfs_dataset_used_bytes{name="tank/video",job="swan"}''; zfs_dataset_used_bytes{name="tank/video",job="swan"}'';
legendFormat = "__auto"; legendFormat = "__auto";
range = true; range = true;
refId = "A"; refId = "A";
@ -631,8 +632,8 @@ in {
uid = promUid; uid = promUid;
}; };
editorMode = "code"; editorMode = "code";
"expr" = "expr" = ''
''increase(zfs_dataset_used_bytes{name="tank"}[30d])''; increase(zfs_dataset_used_bytes{name="tank"}[30d])'';
hide = false; hide = false;
legendFormat = "Past Month"; legendFormat = "Past Month";
range = true; range = true;
@ -688,7 +689,8 @@ in {
matcher = { matcher = {
id = "byName"; id = "byName";
options = "localhost:${ options = "localhost:${
builtins.toString config.services.jellyseerr.port builtins.toString
config.services.jellyseerr.port
}"; }";
}; };
properties = [ properties = [
@ -895,7 +897,7 @@ in {
value = [{ value = [{
targetBlank = true; targetBlank = true;
title = ""; title = "";
url = "https://${config.hostname.metrics}"; url = "https://${config.hostnames.metrics}";
}]; }];
} }
]; ];
@ -2148,10 +2150,11 @@ in {
timepicker = { }; timepicker = { };
timezone = ""; timezone = "";
title = "Main"; title = "Main";
uid = "wcZar5aaa"; uid = "main";
version = 60; version = 60;
weekStart = ""; weekStart = "";
}; }))
}/dashboards";
}]; }];
}; };
}; };