mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
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:
parent
1c224b957f
commit
254b510ce7
2 changed files with 7 additions and 6 deletions
|
@ -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}
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue