refactor(services/self_host): adding the monitor to the nixfmt
This commit is contained in:
parent
2bc5f5ae65
commit
e54c9c482f
1 changed files with 27 additions and 28 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
@ -15,7 +15,7 @@ let
|
||||||
"grafana"
|
"grafana"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg {
|
config = lib.mkIf cfg {
|
||||||
services = {
|
services = {
|
||||||
grafana = {
|
grafana = {
|
||||||
|
|
@ -101,16 +101,16 @@ in
|
||||||
blackbox = {
|
blackbox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configFile = pkgs.writeText "blackbox-exporter.yml" ''
|
configFile = pkgs.writeText "blackbox-exporter.yml" ''
|
||||||
modules:
|
modules:
|
||||||
http_2xx:
|
http_2xx:
|
||||||
prober: http
|
prober: http
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
http:
|
http:
|
||||||
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
|
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
|
||||||
valid_status_codes: []
|
valid_status_codes: []
|
||||||
method: GET
|
method: GET
|
||||||
no_follow_redirects: false
|
no_follow_redirects: false
|
||||||
fail_if_not_ssl: false
|
fail_if_not_ssl: false
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
node.enable = true;
|
node.enable = true;
|
||||||
|
|
@ -212,16 +212,18 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
schema_config = {
|
schema_config = {
|
||||||
configs = [{
|
configs = [
|
||||||
from = "2024-01-01";
|
{
|
||||||
store = "tsdb";
|
from = "2024-01-01";
|
||||||
object_store = "filesystem";
|
store = "tsdb";
|
||||||
schema = "v13";
|
object_store = "filesystem";
|
||||||
index = {
|
schema = "v13";
|
||||||
prefix = "index_";
|
index = {
|
||||||
period = "24h";
|
prefix = "index_";
|
||||||
};
|
period = "24h";
|
||||||
}];
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -277,7 +279,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
alloy.serviceConfig.SupplementaryGroups = [ "systemd-journal" ];
|
alloy.serviceConfig.SupplementaryGroups = [ "systemd-journal" ];
|
||||||
process_exporter = {
|
process_exporter = {
|
||||||
|
|
@ -343,7 +344,5 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue