{ lib, pkgs, config, ... }: with lib; with types; { config = lib.mkIf config.components.monitor.enable { # netdata sink services.opentelemetry-collector.settings.receivers.prometheus.config.scrape_configs = [ { job_name = "netdata"; scrape_interval = "10s"; metrics_path = "/api/v1/allmetrics"; params.format = [ "prometheus" ]; static_configs = [{ targets = [ "127.0.0.1:19999" ]; }]; } ]; # https://docs.netdata.cloud/daemon/config/ services.netdata = { enable = lib.mkDefault true; config = { global = { "memory mode" = "ram"; }; }; }; }; }