[INPUT]
    name                  fluentbit_metrics
    tag                   internal_metrics
    scrape_interval       2

[FILTER]
    name                  multiline
    match                 *
    multiline.key_content log
    mode                  partial_message

[OUTPUT]
    Name                  http
    Match                 *
    Host                  ${OODLE_LOGS_HOST}
    Port                  443
    URI                   /ingest/v1/logs
    Header                X-OODLE-INSTANCE ${OODLE_INSTANCE}
    Header                X-API-KEY ${OODLE_API_KEY}
    Format                json
    Compress              gzip
    Json_date_key         timestamp
    Json_date_format      iso8601
    TLS                   On
    Retry_Limit           3

[OUTPUT]
    Name                  prometheus_remote_write
    Match                 internal_metrics
    Host                  ${OODLE_METRICS_HOST}
    Port                  443
    Uri                   /v1/prometheus/${OODLE_INSTANCE}/write
    Header                X-API-KEY ${OODLE_API_KEY}
    Log_response_payload  True
    Tls                   On
    # These environment variables are added by aws-for-fluent-bit init container
    add_label             ecs_cluster ${ECS_CLUSTER}
    add_label             ecs_task_arn ${ECS_TASK_ARN}
    add_label             ecs_task_definition ${ECS_TASK_DEFINITION}
    add_label             ecs_task_id ${ECS_TASK_ID}
    Retry_Limit           3
