This repository has been archived on 2024-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/hosts/pink/services/monitoring/prometheus.nix
2005 30a1cb6481 🐛 few tweaks
- Rimgo is no longer running in a container
- Forgejo: disabled registration
- Readme, few changes about privacy respecting services
added contact point
2024-06-04 04:45:44 +02:00

75 lines
1.7 KiB
Nix

{ pkgs, config, ... }:
let
lime = "32.54.31.241";
carbon = "32.54.31.180";
in
{
services.prometheus = {
enable = true;
scrapeConfigs = [
{
job_name = "node";
scrape_interval = "5s";
static_configs = [
{
targets = [ "localhost:9001" ];
labels = { alias = "node.pink.local"; };
}
{
targets = [ "${carbon}:9001" ];
labels = { alias = "node.carbon.local"; };
}
{
targets = [ "${lime}:9001" ];
labels = { alias = "node.lime.local"; };
}
];
}
{
job_name = "smartmontools";
scrape_interval = "5s";
static_configs = [
{
targets = [ "localhost:9633" ];
labels = { alias = "smartctl.pink.local"; };
}
{
targets = [ "${lime}:9633" ];
labels = { alias = "smartctl.lime.local"; };
}
{
targets = [ "${carbon}:9633" ];
labels = { alias = "smartctl.carbon.local"; };
}
];
}
{
job_name = "endlessh";
scrape_interval = "5s";
static_configs = [
{
targets = [ "localhost:${toString config.services.endlessh-go.prometheus.port}" ];
labels = { alias = "endlessh.pink.local"; };
}
];
}
{
job_name = "i2p";
scrape_interval = "5s";
static_configs = [
{
targets = [ "localhost:${toString config.services.prometheus.exporters.i2pd.port}" ];
labels = { alias = "i2pd.pink.local"; };
}
];
}
];
};
}