configuration.nix/hosts/rico0/services/apps/prometheus.nix

89 lines
2.4 KiB
Nix
Raw Normal View History

2024-09-14 19:55:57 +05:30
_:
let
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
domainName = "prometheus.labs.adtya.xyz";
in
{
2024-07-17 11:18:33 +05:30
services = {
caddy = {
2024-09-14 19:55:57 +05:30
virtualHosts."${domainName}" = {
logFormat = logFormat domainName;
2024-07-17 11:18:33 +05:30
extraConfig = ''
reverse_proxy 127.0.0.1:9090
'';
};
};
prometheus = {
enable = true;
listenAddress = "127.0.0.1";
2024-07-20 20:17:20 +05:30
port = 9090;
2024-07-21 19:18:44 +05:30
alertmanagers = [
{
scheme = "https";
static_configs = [
{ targets = [ "alertmanager.labs.adtya.xyz" ]; }
];
}
];
2024-07-17 11:18:33 +05:30
scrapeConfigs = [
2024-09-14 20:28:26 +05:30
{
job_name = "caddy";
metrics_path = "/caddy-metrics";
static_configs = [
{ targets = [ "rico0.labs.adtya.xyz" ]; }
{ targets = [ "rico1.labs.adtya.xyz" ]; }
{ targets = [ "rico2.labs.adtya.xyz" ]; }
{ targets = [ "wynne.labs.adtya.xyz" ]; }
{ targets = [ "layne.labs.adtya.xyz" ]; }
];
}
2024-07-20 20:17:20 +05:30
{
job_name = "postgres";
scheme = "https";
metrics_path = "/postgres-metrics";
static_configs = [
{ targets = [ "wynne.labs.adtya.xyz" ]; }
];
}
2024-07-18 23:06:15 +05:30
{
job_name = "systemd";
scheme = "https";
metrics_path = "/systemd-metrics";
static_configs = [
{ targets = [ "rico0.labs.adtya.xyz" ]; }
{ targets = [ "rico1.labs.adtya.xyz" ]; }
{ targets = [ "rico2.labs.adtya.xyz" ]; }
{ targets = [ "wynne.labs.adtya.xyz" ]; }
{ targets = [ "layne.labs.adtya.xyz" ]; }
];
}
{
job_name = "node";
scheme = "https";
static_configs = [
{ targets = [ "rico0.labs.adtya.xyz" ]; }
{ targets = [ "rico1.labs.adtya.xyz" ]; }
{ targets = [ "rico2.labs.adtya.xyz" ]; }
{ targets = [ "wynne.labs.adtya.xyz" ]; }
{ targets = [ "layne.labs.adtya.xyz" ]; }
];
}
2024-07-17 11:18:33 +05:30
{
job_name = "frp";
scheme = "https";
static_configs = [
{ targets = [ "frp.labs.adtya.xyz" ]; }
];
}
{
job_name = "blocky";
2024-07-17 11:26:22 +05:30
scheme = "https";
2024-07-17 11:18:33 +05:30
static_configs = [
2024-07-17 11:26:22 +05:30
{ targets = [ "blocky.labs.adtya.xyz" ]; }
2024-07-17 11:18:33 +05:30
];
}
];
};
2024-07-16 22:59:07 +05:30
};
}