2024-10-27 18:37:28 +05:30
|
|
|
_:
|
|
|
|
let
|
2024-10-27 23:09:50 +05:30
|
|
|
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
|
2024-10-27 18:37:28 +05:30
|
|
|
domainName = "prometheus.labs.adtya.xyz";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
services = {
|
|
|
|
caddy = {
|
|
|
|
virtualHosts."${domainName}" = {
|
2024-10-27 23:09:50 +05:30
|
|
|
inherit logFormat;
|
2024-10-27 18:37:28 +05:30
|
|
|
extraConfig = ''
|
2024-10-27 23:09:50 +05:30
|
|
|
${tlsAcmeDnsChallenge}
|
2024-10-27 18:37:28 +05:30
|
|
|
reverse_proxy 127.0.0.1:9090
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
prometheus = {
|
|
|
|
enable = true;
|
|
|
|
listenAddress = "127.0.0.1";
|
|
|
|
port = 9090;
|
|
|
|
globalConfig = {
|
|
|
|
evaluation_interval = "15s";
|
|
|
|
scrape_interval = "15s";
|
|
|
|
};
|
|
|
|
alertmanagers = [
|
|
|
|
{
|
|
|
|
scheme = "https";
|
|
|
|
static_configs = [
|
|
|
|
{ targets = [ "alertmanager.labs.adtya.xyz" ]; }
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
scrapeConfigs = [
|
|
|
|
{
|
|
|
|
job_name = "ntfy";
|
|
|
|
scheme = "https";
|
|
|
|
metrics_path = "/ntfy-metrics";
|
|
|
|
static_configs = [
|
|
|
|
{ targets = [ "wynne.labs.adtya.xyz" ]; }
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
job_name = "caddy";
|
|
|
|
scheme = "https";
|
|
|
|
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" ]; }
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
job_name = "postgres";
|
|
|
|
scheme = "https";
|
|
|
|
metrics_path = "/postgres-metrics";
|
|
|
|
static_configs = [
|
|
|
|
{ targets = [ "wynne.labs.adtya.xyz" ]; }
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
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 = "smartctl";
|
|
|
|
scheme = "https";
|
|
|
|
metrics_path = "/smartctl-metrics";
|
|
|
|
static_configs = [
|
|
|
|
{ targets = [ "rico0.labs.adtya.xyz" ]; }
|
|
|
|
{ targets = [ "rico1.labs.adtya.xyz" ]; }
|
|
|
|
{ targets = [ "rico2.labs.adtya.xyz" ]; }
|
|
|
|
{ targets = [ "wynne.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" ]; }
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
job_name = "blocky";
|
|
|
|
scheme = "https";
|
|
|
|
static_configs = [
|
2024-10-28 23:54:19 +05:30
|
|
|
{ targets = [ "blocky.rico1.labs.adtya.xyz" ]; }
|
|
|
|
{ targets = [ "blocky.rico2.labs.adtya.xyz" ]; }
|
2024-10-27 18:37:28 +05:30
|
|
|
];
|
|
|
|
}
|
2024-10-29 00:51:16 +05:30
|
|
|
{
|
|
|
|
job_name = "redis";
|
|
|
|
scheme = "https";
|
|
|
|
metrics_path = "/redis-metrics";
|
|
|
|
static_configs = [
|
|
|
|
{ targets = [ "rico1.labs.adtya.xyz" ]; }
|
|
|
|
];
|
|
|
|
}
|
2024-10-27 18:37:28 +05:30
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|