Scraper
Source:
src/AWS/AMP/Scraper.ts
An Amazon Managed Service for Prometheus scraper — a fully-managed, agentless collector that pulls metrics from an Amazon EKS cluster (or a VPC-based Prometheus-compatible source) and remote-writes them into an AMP workspace.
Scraper provisioning is slow (the service creates network interfaces and
an IAM role; expect several minutes to reach ACTIVE).
Creating a Scraper
Section titled “Creating a Scraper”Scrape an EKS Cluster into a Workspace
const workspace = yield* AMP.Workspace("Metrics", {});const scraper = yield* AMP.Scraper("ClusterScraper", { alias: "eks-metrics", scrapeConfiguration: defaultScrapeConfigYaml, source: { eksConfiguration: { clusterArn: cluster.clusterArn, subnetIds: [subnetA.subnetId, subnetB.subnetId], }, }, destinationWorkspaceArn: workspace.workspaceArn,});Scrape a VPC-Based Source
const scraper = yield* AMP.Scraper("VpcScraper", { scrapeConfiguration: scrapeConfigYaml, source: { vpcConfiguration: { subnetIds: [subnet.subnetId], securityGroupIds: [securityGroup.securityGroupId], }, }, destinationWorkspaceArn: workspace.workspaceArn,});