mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 07:15:37 +00:00
fix: failure to provision
This commit is contained in:
parent
3cff7e090c
commit
de1337bf58
@ -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";
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user