1 { config, lib, pkgs, options, ... }:
4 cfg = config.services.prometheus.exporters.artifactory;
5 inherit (lib) mkOption types concatStringsSep;
10 scrapeUri = mkOption {
12 default = "http://localhost:8081/artifactory";
14 URI on which to scrape JFrog Artifactory.
18 artiUsername = mkOption {
21 Username for authentication against JFrog Artifactory API.
25 artiPassword = mkOption {
29 Password for authentication against JFrog Artifactory API.
30 One of the password or access token needs to be set.
34 artiAccessToken = mkOption {
38 Access token for authentication against JFrog Artifactory API.
39 One of the password or access token needs to be set.
46 ${pkgs.prometheus-artifactory-exporter}/bin/artifactory_exporter \
47 --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
48 --artifactory.scrape-uri ${cfg.scrapeUri} \
49 ${concatStringsSep " \\\n " cfg.extraFlags}
52 "ARTI_USERNAME=${cfg.artiUsername}"
53 "ARTI_PASSWORD=${cfg.artiPassword}"
54 "ARTI_ACCESS_TOKEN=${cfg.artiAccessToken}"