exporters:
    awscloudwatch:
        drop_original_metrics:
            CPU_USAGE_IDLE: true
            cpu_time_active: true
        force_flush_interval: 1m0s
        max_datums_per_call: 1000
        max_values_per_datum: 150
        middleware: agenthealth/metrics
        namespace: CWAgent
        region: us-west-2
        resource_to_telemetry_conversion:
            enabled: true
    prometheusremotewrite/amp:
        add_metric_suffixes: true
        auth:
            authenticator: sigv4auth
        compression: ""
        disable_keep_alives: false
        endpoint: https://aps-workspaces.us-west-2.amazonaws.com/workspaces/ws-12345/api/v1/remote_write
        export_created_metric:
            enabled: false
        http2_ping_timeout: 0s
        http2_read_idle_timeout: 0s
        idle_conn_timeout: 1m30s
        max_batch_size_bytes: 3000000
        max_conns_per_host: 0
        max_idle_conns: 100
        max_idle_conns_per_host: 0
        namespace: ""
        proxy_url: ""
        read_buffer_size: 0
        remote_write_queue:
            enabled: true
            num_consumers: 5
            queue_size: 10000
        resource_to_telemetry_conversion:
            clear_after_copy: true
            enabled: true
        retry_on_failure:
            enabled: true
            initial_interval: 50ms
            max_elapsed_time: 5m0s
            max_interval: 30s
            multiplier: 1.5
            randomization_factor: 0.5
        send_metadata: false
        target_info:
            enabled: true
        timeout: 5s
        tls:
            ca_file: ""
            cert_file: ""
            include_system_ca_certs_pool: false
            insecure: false
            insecure_skip_verify: false
            key_file: ""
            max_version: ""
            min_version: ""
            reload_interval: 0s
            server_name_override: ""
        write_buffer_size: 524288
extensions:
    agenthealth/metrics:
        is_status_code_enabled: true
        is_usage_data_enabled: true
        stats:
            operations:
                - PutMetricData
            usage_flags:
                mode: EC2
                region_type: ACJ
    agenthealth/statuscode:
        is_status_code_enabled: true
        is_usage_data_enabled: true
        stats:
            usage_flags:
                mode: EC2
                region_type: ACJ
    entitystore:
        mode: ec2
        region: us-west-2
    sigv4auth:
        assume_role:
            sts_region: us-west-2
        region: us-west-2
processors:
    awsentity/resource:
        entity_type: Resource
        platform: ec2
    batch/host/amp:
        metadata_cardinality_limit: 1000
        send_batch_max_size: 0
        send_batch_size: 8192
        timeout: 1m0s
    batch/jmx/amp:
        metadata_cardinality_limit: 1000
        send_batch_max_size: 0
        send_batch_size: 8192
        timeout: 1m0s
    cumulativetodelta/jmx:
        exclude:
            match_type: ""
        include:
            match_type: ""
        initial_value: 2
        max_staleness: 0s
    deltatocumulative/host/amp:
        max_stale: 336h0m0s
        max_streams: 9223372036854775807
    deltatocumulative/jmx/amp:
        max_stale: 336h0m0s
        max_streams: 9223372036854775807
    filter/jmx:
        error_mode: propagate
        logs: {}
        metrics:
            include:
                match_type: strict
                metric_names:
                    - jvm.memory.heap.init
                    - jvm.memory.heap.used
                    - jvm.memory.nonheap.init
                    - kafka.consumer.fetch-rate
        spans: {}
        traces: {}
    resource/jmx:
        attributes:
            - action: delete
              converted_type: ""
              from_attribute: ""
              from_context: ""
              key: ""
              pattern: telemetry.sdk.*
            - action: delete
              converted_type: ""
              from_attribute: ""
              from_context: ""
              key: service.name
              pattern: ""
              value: unknown_service:java
    transform:
        error_mode: propagate
        flatten_data: false
        log_statements: []
        metric_statements:
            - context: metric
              statements:
                - set(unit, "unit") where name == "cpu_usage_idle"
                - set(name, "CPU_USAGE_IDLE") where name == "cpu_usage_idle"
                - set(unit, "unit") where name == "cpu_usage_nice"
                - set(unit, "unit") where name == "disk_free"
                - set(name, "DISK_FREE") where name == "disk_free"
        trace_statements: []
    transform/jmx:
        error_mode: propagate
        flatten_data: false
        log_statements: []
        metric_statements:
            - context: metric
              statements:
                - set(unit, "unit") where name == "jvm.memory.heap.used"
                - set(name, "JVM_MEM_HEAP_USED") where name == "jvm.memory.heap.used"
                - set(name, "kafka.fetch-rate") where name == "kafka.consumer.fetch-rate"
        trace_statements: []
receivers:
    jmx:
        collection_interval: 1m0s
        endpoint: localhost:8080
        jar_path: ../../packaging/opentelemetry-jmx-metrics.jar
        otlp:
            endpoint: 0.0.0.0:0
            timeout: 5s
        target_system: jvm,kafka-consumer
    telegraf_cpu:
        collection_interval: 1m0s
        initial_delay: 1s
        timeout: 0s
    telegraf_disk:
        collection_interval: 1m0s
        initial_delay: 1s
        timeout: 0s
service:
    extensions:
        - agenthealth/metrics
        - agenthealth/statuscode
        - sigv4auth
        - entitystore
    pipelines:
        metrics/host/amp:
            exporters:
                - prometheusremotewrite/amp
            processors:
                - transform
                - batch/host/amp
                - deltatocumulative/host/amp
            receivers:
                - telegraf_cpu
                - telegraf_disk
        metrics/host/cloudwatch:
            exporters:
                - awscloudwatch
            processors:
                - transform
                - awsentity/resource
            receivers:
                - telegraf_cpu
                - telegraf_disk
        metrics/jmx/amp:
            exporters:
                - prometheusremotewrite/amp
            processors:
                - filter/jmx
                - resource/jmx
                - transform/jmx
                - batch/jmx/amp
                - deltatocumulative/jmx/amp
            receivers:
                - jmx
        metrics/jmx/cloudwatch:
            exporters:
                - awscloudwatch
            processors:
                - filter/jmx
                - resource/jmx
                - transform/jmx
                - cumulativetodelta/jmx
            receivers:
                - jmx
    telemetry:
        logs:
            development: false
            disable_caller: false
            disable_stacktrace: false
            encoding: console
            level: info
            output_paths:
                - /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log
            sampling:
                enabled: true
                initial: 2
                thereafter: 500
                tick: 10s
        metrics:
            address: ""
            level: None
        traces:
            level: None
