mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2025-08-31 08:06:22 +02:00
Compare commits
4 Commits
043099eb37
...
af4a4f1b0c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
af4a4f1b0c | ||
![]() |
2e9416e831 | ||
![]() |
98e3b97194 | ||
![]() |
837a72b940 |
8
flake.lock
generated
8
flake.lock
generated
@ -88,16 +88,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735857245,
|
||||
"narHash": "sha256-AKLLPrgXTxgzll3DqVUMa4QlPlRN3QceutgFBmEf8Nk=",
|
||||
"lastModified": 1753216555,
|
||||
"narHash": "sha256-qfgVfgXjVPV7vEER4PVFiGUOUW08GHH71CVXgYW8EVc=",
|
||||
"owner": "dali99",
|
||||
"repo": "nixos-matrix-modules",
|
||||
"rev": "da9dc0479ffe22362793c87dc089035facf6ec4d",
|
||||
"rev": "099db715d1eba526a464f271b05cead5166fd9a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "dali99",
|
||||
"ref": "0.7.0",
|
||||
"ref": "v0.7.1",
|
||||
"repo": "nixos-matrix-modules",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
pvv-calendar-bot.url = "git+https://git.pvv.ntnu.no/Projects/calendar-bot.git";
|
||||
pvv-calendar-bot.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
matrix-next.url = "github:dali99/nixos-matrix-modules/0.7.0";
|
||||
matrix-next.url = "github:dali99/nixos-matrix-modules/v0.7.1";
|
||||
matrix-next.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
nix-gitea-themes.url = "git+https://git.pvv.ntnu.no/Drift/nix-gitea-themes.git";
|
||||
|
@ -2,11 +2,12 @@
|
||||
stateDir = "/data/monitoring/prometheus";
|
||||
in {
|
||||
imports = [
|
||||
./exim.nix
|
||||
./gitea.nix
|
||||
./machines.nix
|
||||
./matrix-synapse.nix
|
||||
./mysqld.nix
|
||||
./postgres.nix
|
||||
./machines.nix
|
||||
];
|
||||
|
||||
services.prometheus = {
|
||||
|
14
hosts/ildkule/services/monitoring/prometheus/exim.nix
Normal file
14
hosts/ildkule/services/monitoring/prometheus/exim.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.prometheus = {
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "exim";
|
||||
scrape_interval = "15s";
|
||||
static_configs = [{
|
||||
targets = [ "microbel.pvv.ntnu.no:9636" ];
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
@ -1,66 +1,36 @@
|
||||
{ config, ... }: let
|
||||
cfg = config.services.prometheus;
|
||||
|
||||
mkHostScrapeConfig = name: ports: {
|
||||
labels.hostname = name;
|
||||
targets = map (port: "${name}.pvv.ntnu.no:${toString port}") ports;
|
||||
};
|
||||
|
||||
defaultNodeExporterPort = 9100;
|
||||
defaultSystemdExporterPort = 9101;
|
||||
in {
|
||||
services.prometheus.scrapeConfigs = [{
|
||||
job_name = "base_info";
|
||||
static_configs = [
|
||||
{ labels.hostname = "ildkule";
|
||||
targets = [
|
||||
"ildkule.pvv.ntnu.no:${toString cfg.exporters.node.port}"
|
||||
"ildkule.pvv.ntnu.no:${toString cfg.exporters.systemd.port}"
|
||||
];
|
||||
}
|
||||
{ labels.hostname = "bekkalokk";
|
||||
targets = [
|
||||
"bekkalokk.pvv.ntnu.no:9100"
|
||||
"bekkalokk.pvv.ntnu.no:9101"
|
||||
];
|
||||
}
|
||||
{ labels.hostname = "kommode";
|
||||
targets = [
|
||||
"kommode.pvv.ntnu.no:9100"
|
||||
"kommode.pvv.ntnu.no:9101"
|
||||
];
|
||||
}
|
||||
{ labels.hostname = "bicep";
|
||||
targets = [
|
||||
"bicep.pvv.ntnu.no:9100"
|
||||
"bicep.pvv.ntnu.no:9101"
|
||||
];
|
||||
}
|
||||
{ labels.hostname = "brzeczyszczykiewicz";
|
||||
targets = [
|
||||
"brzeczyszczykiewicz.pvv.ntnu.no:9100"
|
||||
"brzeczyszczykiewicz.pvv.ntnu.no:9101"
|
||||
];
|
||||
}
|
||||
{ labels.hostname = "georg";
|
||||
targets = [
|
||||
"georg.pvv.ntnu.no:9100"
|
||||
"georg.pvv.ntnu.no:9101"
|
||||
];
|
||||
}
|
||||
{ labels.hostname = "ustetind";
|
||||
targets = [
|
||||
"ustetind.pvv.ntnu.no:9100"
|
||||
"ustetind.pvv.ntnu.no:9101"
|
||||
];
|
||||
}
|
||||
{ labels.hostname = "hildring";
|
||||
targets = [
|
||||
"hildring.pvv.ntnu.no:9100"
|
||||
];
|
||||
}
|
||||
{ labels.hostname = "isvegg";
|
||||
targets = [
|
||||
"isvegg.pvv.ntnu.no:9100"
|
||||
];
|
||||
}
|
||||
{ labels.hostname = "microbel";
|
||||
targets = [
|
||||
"microbel.pvv.ntnu.no:9100"
|
||||
];
|
||||
}
|
||||
(mkHostScrapeConfig "ildkule" [ cfg.exporters.node.port cfg.exporters.systemd.port ])
|
||||
|
||||
(mkHostScrapeConfig "bekkalokk" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
(mkHostScrapeConfig "bicep" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
(mkHostScrapeConfig "brzeczyszczykiewicz" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
(mkHostScrapeConfig "georg" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
(mkHostScrapeConfig "kommode" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
(mkHostScrapeConfig "ustetind" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
(mkHostScrapeConfig "wenche" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
|
||||
(mkHostScrapeConfig "lupine-1" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
# (mkHostScrapeConfig "lupine-2" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
(mkHostScrapeConfig "lupine-3" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
(mkHostScrapeConfig "lupine-4" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
(mkHostScrapeConfig "lupine-5" [ defaultNodeExporterPort defaultSystemdExporterPort ])
|
||||
|
||||
(mkHostScrapeConfig "hildring" [ defaultNodeExporterPort ])
|
||||
(mkHostScrapeConfig "isvegg" [ defaultNodeExporterPort ])
|
||||
(mkHostScrapeConfig "microbel" [ defaultNodeExporterPort ])
|
||||
];
|
||||
}];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user