add telegraf and fix iowait problems
This commit is contained in:
parent
8ea47e6d55
commit
ee2f34867b
6 changed files with 74 additions and 20 deletions
|
@ -20,9 +20,10 @@
|
||||||
./grocy.nix
|
./grocy.nix
|
||||||
./taskwarrior-pushover.nix
|
./taskwarrior-pushover.nix
|
||||||
#./neo4j.nix
|
#./neo4j.nix
|
||||||
./jellyfin.nix
|
#./jellyfin.nix
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
#./tts.nix
|
#./tts.nix
|
||||||
|
./telegraf.nix
|
||||||
|
|
||||||
# logging
|
# logging
|
||||||
./loki.nix
|
./loki.nix
|
||||||
|
|
|
@ -66,6 +66,18 @@
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
# see https://www.home-assistant.io/integrations/prometheus/
|
||||||
|
job_name = "telgraf";
|
||||||
|
metrics_path = "/metrics";
|
||||||
|
static_configs = [{
|
||||||
|
targets = [ "localhost:9273" ];
|
||||||
|
labels = {
|
||||||
|
service = "telegraf";
|
||||||
|
server = "pepe";
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
30
nixos/machines/pepe/telegraf.nix
Normal file
30
nixos/machines/pepe/telegraf.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
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; }];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -8,9 +8,9 @@
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
};
|
};
|
||||||
services.nginx = {
|
services.nginx =
|
||||||
enable = true;
|
let
|
||||||
virtualHosts. "flix.ingolf-wagner.de" = {
|
flixConfig = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
@ -26,5 +26,10 @@
|
||||||
proxyPass = "http://localhost:8096";
|
proxyPass = "http://localhost:8096";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
virtualHosts. "flix.ingolf-wagner.de" = flixConfig;
|
||||||
|
virtualHosts. "video.ingolf-wagner.de" = flixConfig;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,16 +39,19 @@
|
||||||
lost-fotos = {
|
lost-fotos = {
|
||||||
enable = true;
|
enable = true;
|
||||||
path = "/media/syncthing/lost-fotos.ct";
|
path = "/media/syncthing/lost-fotos.ct";
|
||||||
|
rescanInterval = 40 * 24 * 3600;
|
||||||
};
|
};
|
||||||
movies = {
|
movies = {
|
||||||
enable = true;
|
enable = true;
|
||||||
watch = true;
|
watch = true;
|
||||||
path = "/media/syncthing/movies";
|
path = "/media/syncthing/movies";
|
||||||
|
rescanInterval = 16 * 3600;
|
||||||
};
|
};
|
||||||
music-library = {
|
music-library = {
|
||||||
enable = true;
|
enable = true;
|
||||||
watch = true;
|
watch = true;
|
||||||
path = "/media/syncthing/music";
|
path = "/media/syncthing/music";
|
||||||
|
rescanInterval = 2 * 24 * 3600;
|
||||||
};
|
};
|
||||||
music-projects = {
|
music-projects = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -59,16 +62,19 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
watch = true;
|
watch = true;
|
||||||
path = "/media/syncthing/nextcloud_backup";
|
path = "/media/syncthing/nextcloud_backup";
|
||||||
|
rescanInterval = 23 * 3600;
|
||||||
};
|
};
|
||||||
samples = {
|
samples = {
|
||||||
enable = true;
|
enable = true;
|
||||||
watch = true;
|
watch = true;
|
||||||
path = "/media/syncthing/samples";
|
path = "/media/syncthing/samples";
|
||||||
|
rescanInterval = 41 * 24 * 3600;
|
||||||
};
|
};
|
||||||
series = {
|
series = {
|
||||||
enable = true;
|
enable = true;
|
||||||
watch = true;
|
watch = true;
|
||||||
path = "/media/syncthing/series";
|
path = "/media/syncthing/series";
|
||||||
|
rescanInterval = 15 * 3600;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
lvs = {
|
lvs = {
|
||||||
root = {
|
root = {
|
||||||
type = "lvm_lv";
|
type = "lvm_lv";
|
||||||
size = "100G";
|
size = "200G";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "ext4";
|
format = "ext4";
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
};
|
};
|
||||||
home = {
|
home = {
|
||||||
type = "lvm_lv";
|
type = "lvm_lv";
|
||||||
size = "150G";
|
size = "250G";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "ext4";
|
format = "ext4";
|
||||||
|
|
Loading…
Reference in a new issue