nixos/promtheus-nextcloud-exporter: update module and test

Use new command-line flags of release 0.3.0 and always answer with the
expected XML in the VM test instead of using a test-specific fixed path.

Co-authored-by: ajs124 <git@ajs124.de>
This commit is contained in:
WilliButz 2021-01-17 12:15:40 +01:00
parent 1c224b957f
commit 254b510ce7
No known key found for this signature in database
GPG key ID: 92582A10F1179CB2
2 changed files with 7 additions and 6 deletions

View file

@ -46,11 +46,11 @@ in
DynamicUser = false;
ExecStart = ''
${pkgs.prometheus-nextcloud-exporter}/bin/nextcloud-exporter \
-a ${cfg.listenAddress}:${toString cfg.port} \
-u ${cfg.username} \
-t ${cfg.timeout} \
-l ${cfg.url} \
-p ${escapeShellArg "@${cfg.passwordFile}"} \
--addr ${cfg.listenAddress}:${toString cfg.port} \
--username ${cfg.username} \
--timeout ${cfg.timeout} \
--server ${cfg.url} \
--password ${escapeShellArg "@${cfg.passwordFile}"} \
${concatStringsSep " \\\n " cfg.extraFlags}
'';
};

View file

@ -423,7 +423,7 @@ let
exporterConfig = {
enable = true;
passwordFile = "/var/nextcloud-pwfile";
url = "http://localhost/negative-space.xml";
url = "http://localhost";
};
metricProvider = {
systemd.services.nc-pwfile = let
@ -441,6 +441,7 @@ let
basicAuth.nextcloud-exporter = "snakeoilpw";
locations."/" = {
root = "${pkgs.prometheus-nextcloud-exporter.src}/serverinfo/testdata";
tryFiles = "/negative-space.xml =404";
};
};
};