I’m new to BigFix/ILMT and working on an issue caused by the constant churn of AWS EC2 instances that dynamically spin up and down. I get left with hundreds of “stale” computers a day.
Chef is installing BigFix when the instance is deployed. Then, at any time, the instance can be destroyed, which does not remove the Computer from the BigFix console. BigFix is seeing all these stale computers, and the active ones, with the same Computer Name, so when I try to look up the ComputerID via the Computer Name, it will show up with many many Computer ID’s for that name.
example;
<Query Resource="(id of it) of bes computers whose (hostname of it as string = “blahblah.aws”)">
27681
76826
120086
150354
244953
247185
I was hoping to take an attribute from the EC2 instance, the instance-id, and use that to query for the ComputerID. The instance-id will be a unique identifier. I’m trying to determine how to get that info into the bigfix console with what is already on the EC2 instance by default.
On the EC2 Instance itself, you can run a ‘curl http://169.254.169.254/latest/meta-data/instance-id’ that will return the ID. A GET works the same as well. Example;
[ec2-user@ip-10-200-190-2 ~]$ curl http://169.254.169.254/latest/meta-data/instance-id
i-0bc7bb033asdfsdfsdf30
Is there a way to get that to run on each machine and then populate the result in the BigFix console that I can then use to determine it’s ComputerID so I can use a REST API to then delete it.
I’ve been searching around and can’t find any similar posts/info so far. I know we can’t be the only ones that have this. So, maybe i’m just missing some other, better, option here? I don’t want to age them out too quickly, as I don’t want to loose track of clients that could ‘break’ for other reasons.