2023-05-15 09:30:42 +02:00
|
|
|
{ config, pkgs, ... }:
|
2023-04-29 23:29:05 +02:00
|
|
|
let
|
|
|
|
urls = [
|
2024-08-29 03:26:04 +02:00
|
|
|
{
|
|
|
|
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 = "";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
url = "https://matrix.ingolf-wagner.de";
|
|
|
|
path = "";
|
|
|
|
}
|
2023-04-29 23:29:05 +02:00
|
|
|
];
|
|
|
|
in
|
|
|
|
{
|
|
|
|
services.telegraf = {
|
|
|
|
extraConfig = {
|
|
|
|
# https://github.com/influxdata/telegraf/tree/master/plugins/inputs < all them plugins
|
|
|
|
inputs = {
|
2024-08-29 03:26:04 +02:00
|
|
|
x509_cert = [
|
|
|
|
{
|
|
|
|
sources = (map (url: "${url.url}:443") urls);
|
|
|
|
interval = "30m"; # agent.interval = "10s" is default
|
|
|
|
}
|
|
|
|
];
|
2023-04-29 23:29:05 +02:00
|
|
|
http_response =
|
2024-08-29 03:26:04 +02:00
|
|
|
let
|
|
|
|
fullUrls = map ({ url, path }: "${url}/${path}") urls;
|
|
|
|
in
|
|
|
|
[ { urls = fullUrls; } ];
|
2024-02-13 18:10:29 +01:00
|
|
|
internet_speed.interval = "10m";
|
2023-04-29 23:29:05 +02:00
|
|
|
nginx.urls = [ "http://localhost/nginx_status" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|