Monitoring

class aws_cdk.aws_stepfunctions_tasks.Monitoring(*, log_bucket=None, logging=None, log_group=None, log_stream_name_prefix=None, persistent_app_ui=None)

Bases: object

Configuration setting for monitoring.

Parameters
  • log_bucket (Optional[IBucket]) – Amazon S3 Bucket for monitoring log publishing. You can configure your jobs to send log information to Amazon S3. Default: - if logging is manually set to true and a logBucket is not provided, a logBucket will be automatically generated`.

  • logging (Optional[bool]) – Enable logging for this job. If set to true, will automatically create a Cloudwatch Log Group and S3 bucket. This will be set to true implicitly if values are provided for logGroup or logBucket. Default: true - true if values are provided for logGroup or logBucket, false otherwise

  • log_group (Optional[ILogGroup]) – A log group for CloudWatch monitoring. You can configure your jobs to send log information to CloudWatch Logs. Default: - if logging is manually set to true and a logGroup is not provided, a logGroup will be automatically generated`.

  • log_stream_name_prefix (Optional[str]) – A log stream name prefix for Cloudwatch monitoring. Default: - Log streams created in this log group have no default prefix

  • persistent_app_ui (Optional[bool]) – Monitoring configurations for the persistent application UI. Default: true

ExampleMetadata

infused

Example:

tasks.EmrContainersStartJobRun(self, "EMR Containers Start Job Run",
    virtual_cluster=tasks.VirtualClusterInput.from_virtual_cluster_id("de92jdei2910fwedz"),
    release_label=tasks.ReleaseLabel.EMR_6_2_0,
    job_driver=tasks.JobDriver(
        spark_submit_job_driver=tasks.SparkSubmitJobDriver(
            entry_point=sfn.TaskInput.from_text("local:///usr/lib/spark/examples/src/main/python/pi.py"),
            spark_submit_parameters="--conf spark.executor.instances=2 --conf spark.executor.memory=2G --conf spark.executor.cores=2 --conf spark.driver.cores=1"
        )
    ),
    monitoring=tasks.Monitoring(
        logging=True
    )
)

Attributes

log_bucket

Amazon S3 Bucket for monitoring log publishing.

You can configure your jobs to send log information to Amazon S3.

Default
  • if logging is manually set to true and a logBucket is not provided, a logBucket will be automatically generated`.

Return type

Optional[IBucket]

log_group

A log group for CloudWatch monitoring.

You can configure your jobs to send log information to CloudWatch Logs.

Default
  • if logging is manually set to true and a logGroup is not provided, a logGroup will be automatically generated`.

Return type

Optional[ILogGroup]

log_stream_name_prefix

A log stream name prefix for Cloudwatch monitoring.

Default
  • Log streams created in this log group have no default prefix

Return type

Optional[str]

logging

Enable logging for this job.

If set to true, will automatically create a Cloudwatch Log Group and S3 bucket. This will be set to true implicitly if values are provided for logGroup or logBucket.

Default

true - true if values are provided for logGroup or logBucket, false otherwise

Return type

Optional[bool]

persistent_app_ui

Monitoring configurations for the persistent application UI.

Default

true

Return type

Optional[bool]