1 { config, lib, pkgs, options, ... }:
4 cfg = config.services.prometheus.exporters.json;
16 configFile = mkOption {
19 Path to configuration file.
26 ${pkgs.prometheus-json-exporter}/bin/json_exporter \
27 --config.file ${escapeShellArg cfg.configFile} \
28 --web.listen-address="${cfg.listenAddress}:${toString cfg.port}" \
29 ${concatStringsSep " \\\n " cfg.extraFlags}
34 (mkRemovedOptionModule [ "url" ] ''
35 This option was removed. The URL of the endpoint serving JSON
36 must now be provided to the exporter by prometheus via the url
39 In prometheus a scrape URL would look like this:
41 http://some.json-exporter.host:7979/probe?target=https://example.com/some/json/endpoint
43 For more information, take a look at the official documentation
44 (https://github.com/prometheus-community/json_exporter) of the json_exporter.
46 ({ options.warnings = options.warnings; options.assertions = options.assertions; })