better docker and speedtest

This commit is contained in:
soraefir
2026-06-06 13:56:50 +02:00
parent ce3ac9f06a
commit e24c9fd66a
3 changed files with 84 additions and 14 deletions

View File

@@ -182,20 +182,81 @@ let
};
})
(lib.mkIf (hasCollector "docker") {
inputs.docker = {
endpoint = "unix:///var/run/docker.sock";
timeout = "5s";
perdevice_include = [ ];
total_include = [ ];
fielddrop = [
"memory_total"
"n_cpus"
"n_goroutines"
"n_listener_events"
"n_used_file_descriptors"
"server_version"
];
};
inputs.docker = [
{
endpoint = "unix:///var/run/docker.sock";
timeout = "5s";
perdevice_include = [ ];
total_include = [ ];
docker_label_exclude = [ "*" ];
tagexclude = [
"container_image"
"container_status"
"container_version"
"engine_host"
"server_version"
];
namedrop = [
"docker_container_health"
"docker_container_mem"
"docker_container_status"
];
fielddrop = [
"memory_total"
"n_cpus"
"n_goroutines"
"n_listener_events"
"n_used_file_descriptors"
"server_version"
];
}
{
endpoint = "unix:///var/run/docker.sock";
timeout = "5s";
perdevice_include = [ ];
total_include = [ ];
docker_label_exclude = [ "*" ];
tagexclude = [
"container_image"
"container_status"
"container_version"
"engine_host"
"server_version"
];
namepass = [ "docker_container_mem" ];
fielddrop = [
"active_anon"
"active_file"
"container_id"
"hierarchical_memory_limit"
"inactive_anon"
"inactive_file"
"mapped_file"
"max_usage"
"pgfault"
"pgmajfault"
"pgpgin"
"pgpgout"
"rss_huge"
"total_active_anon"
"total_active_file"
"total_cache"
"total_inactive_anon"
"total_inactive_file"
"total_mapped_file"
"total_pgfault"
"total_pgmajfault"
"total_pgpgin"
"total_pgpgout"
"total_rss"
"total_rss_huge"
"total_unevictable"
"total_writeback"
"unevictable"
"writeback"
];
}
];
})
(lib.mkIf (hasCollector "ping") {
inputs.ping = {
@@ -210,6 +271,13 @@ let
];
};
})
(lib.mkIf (hasCollector "internet_speed") {
inputs.internet_speed = {
interval = "30m";
cache = true;
memory_saving_mode = true;
};
})
(lib.mkIf (hasCollector "gpu") {
inputs.exec = [{
commands = [ amdgpuMetricsScript ];

View File

@@ -23,6 +23,7 @@ with lib; {
"smart"
"docker"
"ping"
"internet_speed"
"gpu"
]);
default = [ ];

View File

@@ -103,6 +103,7 @@
#"processes"
"docker"
"ping"
"internet_speed"
];
outputs = [ "http://127.0.0.1:8181" ];
};