Howdy! Is there a way to add batch add labels to e...
# kolide
h
Howdy! Is there a way to add batch add labels to enrolled nodes with
fleectl
? For example we have a number of enrolled centos linux hosts that we’d like to label with
dev
and
prod
n
@harveywells you'd need something on the system to identify
dev
/
prod
hosts (such as environment variables or a file or something -- placed by whatever config mgmt tool you use), but then it's easy:
Copy code
---
apiVersion: v1
kind: label
spec:
  name: prod
  query: >
    SELECT * FROM process_envs WHERE key = 'MY_ENV_KEY' AND value = 'prod';
The first things that come to mind are... files on the system, env vars, or maybe ec2_instance_metadata / ec2_instance_tags, but that'll be up to you / your environment.
z
btw “manual labels” are an existing feature request and something I would love to get to. It’s nontrivial so no eta.