forked from the-distro/infra
feat(monitoring): add static label for tenancy
So we can distinguish easily things in the dashboards. Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
8838709a95
commit
1e421889e4
|
@ -127,6 +127,7 @@
|
|||
deployment.tags = lib.mkIf (config.bagel.baremetal.builders.enable -> !config.bagel.baremetal.builders.netboot)
|
||||
[ "localboot" ];
|
||||
|
||||
bagel.monitoring.grafana-agent.tenant = "floral";
|
||||
bagel.secrets.tenant = "floral";
|
||||
bagel.builders.extra-build-capacity.provider.tenant = "floral";
|
||||
})
|
||||
|
@ -155,6 +156,7 @@
|
|||
deployment.tags = [ "localboot" ];
|
||||
|
||||
|
||||
bagel.monitoring.grafana-agent.tenant = "lix";
|
||||
bagel.secrets.tenant = "lix";
|
||||
bagel.builders.extra-build-capacity.provider.tenant = "lix";
|
||||
}
|
||||
|
|
|
@ -12,6 +12,14 @@ in
|
|||
options.bagel.monitoring.grafana-agent = {
|
||||
enable = (mkEnableOption "Grafana Agent") // { default = true; };
|
||||
|
||||
tenant = mkOption {
|
||||
description = ''
|
||||
Which tenant are we enabling Grafana Agent for.
|
||||
'';
|
||||
example = "lix";
|
||||
type = types.enum [ "lix" "floral" ];
|
||||
};
|
||||
|
||||
exporters = mkOption {
|
||||
description = ''
|
||||
Set of additional exporters to scrape.
|
||||
|
@ -76,7 +84,10 @@ in
|
|||
};
|
||||
}
|
||||
];
|
||||
global.external_labels.hostname = config.networking.hostName;
|
||||
global.external_labels = {
|
||||
hostname = config.networking.hostName;
|
||||
inherit (cfg) tenant;
|
||||
};
|
||||
configs = [
|
||||
{
|
||||
name = config.networking.hostName;
|
||||
|
|
Loading…
Reference in a new issue