80 lines
1.8 KiB
Nix
80 lines
1.8 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"; };
|
||
|
}
|
||
|
|
||
|
{
|
||
|
targets = [ "32.54.31.172:9001" ];
|
||
|
labels = { alias = "node.strix.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"; };
|
||
|
}
|
||
|
];
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
}
|