~$ curl -s localhost:9090/api/v1/targets | jq .data.activeTargets[0]
{
  "discoveredLabels": {
    "__address__": "172.31.36.137:80",
    "__meta_ec2_availability_zone": "eu-central-1b",
    "__meta_ec2_instance_id": "i-00b1717ed1e92da21",
    "__meta_ec2_instance_state": "running",
    "__meta_ec2_instance_type": "t2.micro",
    "__meta_ec2_owner_id": "130587313947",
    "__meta_ec2_primary_subnet_id": "subnet-d4a883ae",
    "__meta_ec2_private_dns_name": "ip-172-31-36-137.eu-central-
                                            1.compute.internal",
    "__meta_ec2_private_ip": "172.31.36.137",
    "__meta_ec2_public_dns_name": "ec2-3-121-233-104.eu-central-
                                            1.compute.amazonaws.com",
    "__meta_ec2_public_ip": "3.121.233.104",
    "__meta_ec2_subnet_id": ",subnet-d4a883ae,",
    "__meta_ec2_tag_aws_cloudformation_logical_id": "node1",
    "__meta_ec2_tag_aws_cloudformation_stack_id": "arn:aws:cloudformation:
             eu-central-1:130587313947:stack/prometheustest/
             be381940-406a-11ea-ab42-02012ecdd3ee",
    "__meta_ec2_tag_aws_cloudformation_stack_name": "prometheustest",
    "__meta_ec2_vpc_id": "vpc-d05177b8",
    "__metrics_path__": "/metrics",
    "__scheme__": "http",
    "job": "ec2"
  },
  "labels": {
    "instance": "node1",
    "job": "ec2"
  },
  "scrapeUrl": "http://3.121.233.104:9100/metrics",
  "lastError": "",
  "lastScrape": "2024-01-26T20:42:34.871171978Z",
  "health": "up"
}
