class CfnScraperLogsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.APS.Mixins.CfnScraperLogsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsaps/mixins#CfnScraperLogsMixin |
Java | software.amazon.awscdk.mixins.preview.services.aps.mixins.CfnScraperLogsMixin |
Python | aws_cdk.mixins_preview.aws_aps.mixins.CfnScraperLogsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_aps » mixins » CfnScraperLogsMixin |
Implements
IMixin
Extends
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.
For more information about collectors, including what metrics are collected, and how to configure the scraper, see Using an AWS managed collector in the Amazon Managed Service for Prometheus User Guide .
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-scraper.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from '@aws-cdk/mixins-preview';
import { mixins as aps_mixins } from '@aws-cdk/mixins-preview/aws-aps';
declare const logsDelivery: logs.ILogsDelivery;
const cfnScraperLogsMixin = new aps_mixins.CfnScraperLogsMixin('logType', logsDelivery);
Initializer
new CfnScraperLogsMixin(logType: string, logDelivery: ILogsDelivery)
Parameters
- logType
string— Type of logs that are getting vended. - logDelivery
ILogs— Object in charge of setting up the delivery source, delivery destination, and delivery connection.Delivery
Create a mixin to enable vended logs for AWS::APS::Scraper.
Properties
| Name | Type | Description |
|---|---|---|
| log | ILogs | |
| log | string | |
| static APPLICATION_LOGS | Cfn |
logDelivery
Type:
ILogs
logType
Type:
string
static APPLICATION_LOGS
Type:
Cfn
Methods
| Name | Description |
|---|---|
| apply | Apply vended logs configuration to the construct. |
| supports(construct) | Check if this mixin supports the given construct (has vendedLogs property). |
applyTo(resource)
public applyTo(resource: IConstruct): IConstruct
Parameters
- resource
IConstruct
Returns
Apply vended logs configuration to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct (has vendedLogs property).

.NET
Go
Java
Python
TypeScript