VEGAS/ipfs: expose metrics
This commit is contained in:
parent
1d32eb782e
commit
0cd40f0f47
2 changed files with 21 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ aspect, config, lib, pkgs, tools, ... }:
|
{ aspect, config, hosts, lib, pkgs, tools, ... }:
|
||||||
with tools.nginx;
|
with tools.nginx;
|
||||||
let
|
let
|
||||||
inherit (tools.meta) domain;
|
inherit (tools.meta) domain;
|
||||||
|
@ -56,6 +56,15 @@ in
|
||||||
locations."/api".proxyPass = "http://unix:/run/ipfs/ipfs-api.sock:";
|
locations."/api".proxyPass = "http://unix:/run/ipfs/ipfs-api.sock:";
|
||||||
locations."/ipns/webui.ipfs.${domain}".proxyPass = "http://127.0.0.1:${gwPort}/ipns/webui.ipfs.${domain}";
|
locations."/ipns/webui.ipfs.${domain}".proxyPass = "http://127.0.0.1:${gwPort}/ipns/webui.ipfs.${domain}";
|
||||||
locations."= /".return = "302 /ipns/webui.ipfs.${domain}";
|
locations."= /".return = "302 /ipns/webui.ipfs.${domain}";
|
||||||
|
locations."/debug/metrics/prometheus" = {
|
||||||
|
proxyPass = "http://unix:/run/ipfs/ipfs-api.sock:";
|
||||||
|
extraConfig = ''
|
||||||
|
access_log off;
|
||||||
|
auth_request off;
|
||||||
|
allow ${hosts.VEGAS.interfaces.primary.addr};
|
||||||
|
deny all;
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.oauth2_proxy.nginx.virtualHosts = [ "ipfs.admin.${domain}" ];
|
services.oauth2_proxy.nginx.virtualHosts = [ "ipfs.admin.${domain}" ];
|
||||||
|
|
|
@ -106,6 +106,17 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
job_name = "ipfs";
|
||||||
|
scheme = "https";
|
||||||
|
metrics_path = "/debug/metrics/prometheus";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [ "ipfs.admin.${domain}" ];
|
||||||
|
labels.instance = "VEGAS";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue