nixos-config/nixos/machines/pepe/telegraf.nix

35 lines
930 B
Nix
Raw Normal View History

2023-02-24 02:01:18 +01:00
let
urls = [
"https://bitwarden.ingolf-wagner.de"
"https://flix.ingolf-wagner.de"
"https://git.ingolf-wagner.de"
"https://ingolf-wagner.de"
"https://nextcloud.ingolf-wagner.de"
"https://nextcloud.ingolf-wagner.de"
"https://tech.ingolf-wagner.de"
];
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}:443") urls);
interval = "30m"; # agent.interval = "10s" is default
}];
http_response = [{ inherit urls; }];
2023-02-24 03:51:12 +01:00
processes = { };
systemd_units = { };
internet_speed.interval = "50m";
nginx.urls = [ "http://localhost/nginx_status" ];
2023-02-24 02:01:18 +01:00
};
};
};
}