36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
let
|
|
urls = [
|
|
{ url = "https://bitwarden.ingolf-wagner.de"; path = ""; }
|
|
{ url = "https://flix.ingolf-wagner.de"; path = "web/index.html"; }
|
|
{ url = "https://git.ingolf-wagner.de"; path = ""; }
|
|
{ url = "https://ingolf-wagner.de"; path = ""; }
|
|
{ url = "https://nextcloud.ingolf-wagner.de"; path = "login"; }
|
|
{ url = "https://tech.ingolf-wagner.de"; path = ""; }
|
|
];
|
|
|
|
in
|
|
{
|
|
services.telegraf = {
|
|
enable = true;
|
|
extraConfig = {
|
|
outputs.prometheus_client = {
|
|
listen = ":9273";
|
|
metric_version = 2;
|
|
};
|
|
# https://github.com/influxdata/telegraf/tree/master/plugins/inputs < all them plugins
|
|
inputs = {
|
|
x509_cert = [{
|
|
sources = (map (url: "${url.url}:443") urls);
|
|
interval = "30m"; # agent.interval = "10s" is default
|
|
}];
|
|
http_response =
|
|
let fullUrls = map ({ url, path }: "${url}/${path}") urls;
|
|
in [{ urls = fullUrls; }];
|
|
processes = { };
|
|
systemd_units = { };
|
|
internet_speed.interval = "50m";
|
|
nginx.urls = [ "http://localhost/nginx_status" ];
|
|
};
|
|
};
|
|
};
|
|
}
|