How to query puppet db under /facts and receive only active instances
Hello,
When querying puppet db with a query like this: "curl -X GET http://puppetserver:8080/pdb/query/v4... --data-urlencode 'query=[\"extract\", \"value\",[\"and\",[\"=\",\"certname\", \"${machine}\"]]]'"
I receive all instances with the relevant ec2_project tag. I want to omit the inactive instances and receive only running ones.
How can I get it done?