You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this requires
adding nixos/modules/services/monitoring/prometheus/exporters/qbittorrent.nix
patching nixos/modules/services/monitoring/prometheus/exporters.nix
disabling the module services/monitoring/prometheus/default.nix
importing prometheus/default.nix from the patched nixpkgs
{config,pkgs,lib,modulesPath,inputs, ... }:
{# override nixos modules# https://stackoverflow.com/a/46407944/10440128# see also: nixos/modules/module-list.nixdisabledModules=[# no. error: The option `services.prometheus.exporters.qbittorrent' does not exist.# override services.prometheus#"services/monitoring/prometheus/default.nix"# override services.prometheus.exporters"services/monitoring/prometheus/exporters.nix"];imports=[./hardware-configuration.nix# no. error: The option `services.prometheus.exporters.qbittorrent' does not exist.# override services.prometheus#./modules/services/monitoring/prometheus/default.nix# override services.prometheus.exporters./modules/services/monitoring/prometheus/exporters.nix];
expected
ideally this should work without patching prometheus/exporters.nix
only by adding prometheus/exporters/qbittorrent.nix to imports
/etc/nixos/configuration.nix
{config,pkgs,lib,modulesPath,inputs, ... }:
{imports=[./hardware-configuration.nix# TODO implement modular prometheus exporters# add services.prometheus.exporters.qbittorrent./modules/services/monitoring/prometheus/exporters/qbittorrent.nix];services.grafana={enable=true;declarativePlugins=withpkgs.grafanaPlugins;[grafana-piechart-panel# for prometheus-qbittorrent-exporter];settings={# ...};};services.prometheus={enable=true;port=9001;# /var/lib/prometheus2/#retentionTime = "15d"; # default -> 80 MBretentionTime="740d";# 2 years -> 4 GBexporters={node={enable=true;enabledCollectors=["systemd"];port=9002;};qbittorrent={enable=true;port=9003;qbittorrentPort=1952;package=pkgs.nur.repos.milahu.prometheus-qbittorrent-exporter;};};scrapeConfigs=[{job_name="chrysalis";static_configs=[{targets=["127.0.0.1:${toStringconfig.services.prometheus.exporters.node.port}""127.0.0.1:${toStringconfig.services.prometheus.exporters.qbittorrent.port}"];}];}];};
possible solution
add a mkPrometheusExporter function
so prometheus/exporters/qbittorrent.nix looks like
currently im trying to add
services.prometheus.exporters.qbittorrent
to fix Package request: prometheus-qbittorrent-exporter
actual
this requires
adding
nixos/modules/services/monitoring/prometheus/exporters/qbittorrent.nix
patching
nixos/modules/services/monitoring/prometheus/exporters.nix
disabling the module
services/monitoring/prometheus/default.nix
importing
prometheus/default.nix
from the patched nixpkgsexpected
ideally this should work without patching
prometheus/exporters.nix
only by adding
prometheus/exporters/qbittorrent.nix
toimports
/etc/nixos/configuration.nix
possible solution
add a
mkPrometheusExporter
functionso
prometheus/exporters/qbittorrent.nix
looks likeprobably this would require
adding all prometheus exporters to
nixos/modules/module-list.nix
keywords
The text was updated successfully, but these errors were encountered: