10 cfg = config.services.prometheus.exporters.pihole;
20 (mkRemovedOptionModule [ "interval" ] "This option has been removed.")
22 options.warnings = options.warnings;
23 options.assertions = options.assertions;
32 example = "580a770cb40511eb85290242ac130003580a770cb40511eb85290242ac130003";
34 Pi-Hole API token which can be used instead of a password
42 The password to login into Pi-Hole. An api token can be used instead.
45 piholeHostname = mkOption {
48 example = "127.0.0.1";
50 Hostname or address where to find the Pi-Hole webinterface
53 piholePort = mkOption {
58 The port Pi-Hole webinterface is reachable on
69 The protocol which is used to connect to Pi-Hole
76 Controls the timeout to connect to a Pi-Hole instance
83 ${pkgs.prometheus-pihole-exporter}/bin/pihole-exporter \
84 ${optionalString (cfg.apiToken != "") "-pihole_api_token ${cfg.apiToken}"} \
85 -pihole_hostname ${cfg.piholeHostname} \
86 ${optionalString (cfg.password != "") "-pihole_password ${cfg.password}"} \
87 -pihole_port ${toString cfg.piholePort} \
88 -pihole_protocol ${cfg.protocol} \
89 -port ${toString cfg.port} \
90 -timeout ${cfg.timeout}