monitoring: always include tier label in scrape configs
All checks were successful
Run nix flake check / flake-check (push) Successful in 2m8s
All checks were successful
Run nix flake check / flake-check (push) Successful in 2m8s
Previously tier was only included if non-default (not "prod"), which meant prod hosts had no tier label. This made the Grafana tier filter only show "test" since "prod" never appeared in label_values(). Now tier is always included, so both "prod" and "test" appear in the fleet dashboard tier selector. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -58,10 +58,9 @@ let
|
||||
};
|
||||
|
||||
# Build effective labels for a host
|
||||
# Always includes hostname; only includes tier/priority/role if non-default
|
||||
# Always includes hostname and tier; only includes priority/role if non-default
|
||||
buildEffectiveLabels = host:
|
||||
{ hostname = host.hostname; }
|
||||
// (lib.optionalAttrs (host.tier != "prod") { tier = host.tier; })
|
||||
{ hostname = host.hostname; tier = host.tier; }
|
||||
// (lib.optionalAttrs (host.priority != "high") { priority = host.priority; })
|
||||
// (lib.optionalAttrs (host.role != null) { role = host.role; })
|
||||
// host.labels;
|
||||
|
||||
Reference in New Issue
Block a user