Skip to content

Create Scraper

prometheusservice_create_scraper R Documentation

The CreateScraper operation creates a scraper to collect metrics

Description

The create_scraper operation creates a scraper to collect metrics. A scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS cluster, and sends them to your Amazon Managed Service for Prometheus workspace. Scrapers are flexible, and can be configured to control what metrics are collected, the frequency of collection, what transformations are applied to the metrics, and more.

An IAM role will be created for you that Amazon Managed Service for Prometheus uses to access the metrics in your cluster. You must configure this role with a policy that allows it to scrape metrics from your cluster. For more information, see Configuring your Amazon EKS cluster in the Amazon Managed Service for Prometheus User Guide.

The scrapeConfiguration parameter contains the base-64 encoded YAML configuration for the scraper.

For more information about collectors, including what metrics are collected, and how to configure the scraper, see Using an Amazon Web Services managed collector in the Amazon Managed Service for Prometheus User Guide.

Usage

prometheusservice_create_scraper(alias, clientToken, destination,
  scrapeConfiguration, source, tags)

Arguments

alias

(optional) An alias to associate with the scraper. This is for your use, and does not need to be unique.

clientToken

(Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request.

destination

[required] The Amazon Managed Service for Prometheus workspace to send metrics to.

scrapeConfiguration

[required] The configuration file to use in the new scraper. For more information, see Scraper configuration in the Amazon Managed Service for Prometheus User Guide.

source

[required] The Amazon EKS cluster from which the scraper will collect metrics.

tags

(Optional) The list of tag keys and values to associate with the scraper.

Value

A list with the following syntax:

list(
  arn = "string",
  scraperId = "string",
  status = list(
    statusCode = "CREATING"|"UPDATING"|"ACTIVE"|"DELETING"|"CREATION_FAILED"|"UPDATE_FAILED"|"DELETION_FAILED"
  ),
  tags = list(
    "string"
  )
)

Request syntax

svc$create_scraper(
  alias = "string",
  clientToken = "string",
  destination = list(
    ampConfiguration = list(
      workspaceArn = "string"
    )
  ),
  scrapeConfiguration = list(
    configurationBlob = raw
  ),
  source = list(
    eksConfiguration = list(
      clusterArn = "string",
      securityGroupIds = list(
        "string"
      ),
      subnetIds = list(
        "string"
      )
    )
  ),
  tags = list(
    "string"
  )
)