hosts/monitoring-3: validate nixos hash versions
This commit is contained in:
parent
6082fb0744
commit
4fffc64c35
@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673469143,
|
||||
"narHash": "sha256-WjAOVocMcsRewz+xWPe0WX+N8nJI+ycflzK+bZLOCrw=",
|
||||
"lastModified": 1675467146,
|
||||
"narHash": "sha256-exQHThJOGXYb9MvWUlU3/dhQJuqd5lSO7B1UuAA79g0=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "c0cb8db954a458efe849a6e1926ec900ef3356ad",
|
||||
"revCount": 10,
|
||||
"rev": "19120d4d0a2bfe4d8342db17176bd207e5f08800",
|
||||
"revCount": 12,
|
||||
"type": "git",
|
||||
"url": "https://git.clerie.de/clerie/nixos-exporter.git"
|
||||
},
|
||||
|
@ -8,6 +8,7 @@
|
||||
../../configuration/proxmox-vm
|
||||
./alertmanager.nix
|
||||
./grafana.nix
|
||||
./nixos-validator.nix
|
||||
./prometheus.nix
|
||||
./uptimestatus.nix
|
||||
];
|
||||
|
27
hosts/monitoring-3/nixos-validator.nix
Normal file
27
hosts/monitoring-3/nixos-validator.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
users.users."nixos-validator" = {
|
||||
isSystemUser = true;
|
||||
group = "nixos-validator";
|
||||
};
|
||||
|
||||
users.groups."nixos-validator" = {};
|
||||
|
||||
systemd.services."prometheus-nixos-validator" = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
PrivateTmp = true;
|
||||
WorkingDirectory = "/tmp";
|
||||
RuntimeDirectory = "prometheus-nixos-validator";
|
||||
User = "nixos-validator";
|
||||
Group = "nixos-validator";
|
||||
ExecStart = ''
|
||||
${pkgs.nixos-exporter}/bin/nixos-exporter --listen [::]:9153 validator --prometheus-url "http://[::1]:9090" --prometheus-query-tag-template "instance=\"{}.net.clerie.de\"" --hydra-url "https://hydra.clerie.de"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
@ -127,6 +127,28 @@ in {
|
||||
relabelAddressToInstance
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "nixos-validator";
|
||||
scrape_interval = "1m";
|
||||
static_configs = [
|
||||
{
|
||||
targets = nixosMonitoringTargets;
|
||||
}
|
||||
];
|
||||
relabel_configs = [
|
||||
{
|
||||
source_labels = [ "__address__" ];
|
||||
target_label = "__param_target";
|
||||
regex = ''([\w-]+)\.mon\.clerie\.de\:\d+'';
|
||||
replacement = "\${1}";
|
||||
}
|
||||
relabelAddressToInstance
|
||||
{
|
||||
target_label = "__address__";
|
||||
replacement = "[::1]:9153";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "bird-exporter";
|
||||
scrape_interval = "20s";
|
||||
|
Loading…
Reference in New Issue
Block a user