mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(octoprint): metrics
This commit is contained in:
parent
1ead7f237e
commit
2c9219ba87
8 changed files with 91 additions and 18 deletions
|
|
@ -22,7 +22,9 @@
|
|||
portName,
|
||||
}: let
|
||||
port = service.ports.${portName};
|
||||
in "${mkAddress6 (access.getAddressFor system.name "lan")}:${toString port.port}";
|
||||
# TODO: this properly
|
||||
getAddressFor = if port.status.gatus.client.network or "ip" == "ip4" then "getAddress4For" else "getAddressFor";
|
||||
in "${mkAddress6 (access.${getAddressFor} system.name "lan")}:${toString port.port}";
|
||||
mkServiceConfig = system: serviceName: let
|
||||
inherit (service.prometheus) exporter;
|
||||
service = system.exports.services.${serviceName};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue