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

115 lines
3.2 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;
globalConfig = {
evaluation_interval = "15s";
scrape_interval = "15s";
};
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-18 00:30:39 +05:30
{
job_name = "ntfy";
scheme = "https";
metrics_path = "/ntfy-metrics";
static_configs = [
{ targets = [ "wynne.labs.adtya.xyz" ]; }
];
}
2024-09-14 20:28:26 +05:30
{
job_name = "caddy";
scheme = "https";
2024-09-14 20:28:26 +05:30
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" ]; }
];
}
2024-09-19 19:08:58 +05:30
{
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" ]; }
];
}
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
};
}