CfnScraperLogsMixin

class aws_cdk.mixins_preview.aws_aps.mixins.CfnScraperLogsMixin(log_type, log_delivery)

Bases: Mixin

A scraper is a fully-managed agentless collector that discovers and pulls metrics automatically.

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. You can configure the scraper 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 YAML configuration for the scraper. .. epigraph:

For more information about collectors, including what metrics are collected, and how to configure the scraper, see `Using an AWS managed collector <https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html>`_ in the *Amazon Managed Service for Prometheus User Guide* .
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-scraper.html

CloudformationResource:

AWS::APS::Scraper

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import aws_logs as logs
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

# logs_delivery: logs.ILogsDelivery

cfn_scraper_logs_mixin = aps_mixins.CfnScraperLogsMixin("logType", logs_delivery)

Create a mixin to enable vended logs for AWS::APS::Scraper.

Parameters:
  • log_type (str) – Type of logs that are getting vended.

  • log_delivery (ILogsDelivery) – Object in charge of setting up the delivery destination and delivery connection.

Methods

apply_to(resource)

Apply vended logs configuration to the construct.

Parameters:

resource (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct (has vendedLogs property).

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

APPLICATION_LOGS = <aws_cdk.mixins_preview.aws_aps.mixins.CfnScraperApplicationLogs object>

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental