Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sent payloads not valid JSON, wrapped in function call #126

Open
grandstairs opened this issue May 17, 2024 · 0 comments
Open

Sent payloads not valid JSON, wrapped in function call #126

grandstairs opened this issue May 17, 2024 · 0 comments

Comments

@grandstairs
Copy link

grandstairs commented May 17, 2024

When I send a message it shows up in cloudwatch as a function call for some reason.

f, _ := fluent.New(fluent.Config{FluentPort: port, FluentHost: "localhost"})
f.Post("tag_name_here", msg) // msg is EMF payload
f.Close()
function-wrapped

I am trying to use fluent bit to post EMF payloads to a specific cloudwatch log group so I can use them for metrics.

My fluentbit configuration if it helps

[SERVICE]
    HTTP_Server  On
    HTTP_Listen  0.0.0.0
    HTTP_PORT    2020
    Flush        1
    Grace        30
    Log_Level    info
    storage.path /var/log/flb-storage/
    storage.max_chunks_up  32

[INPUT]
    Name          tcp
    Alias         TCP-ServiceMetrics
    Tag           ServiceMetrics
    Listen        0.0.0.0
    Port          5172
    Format        none
    Chunk_Size    32
    Buffer_Size   256
    storage.type  filesystem

[OUTPUT]
    Name                cloudwatch_logs
    Alias               CloudWatch-ServiceMetrics
    Match               ServiceMetrics
    region              ${LOG_REGION}
    log_group_name      SampleApp-${STAGE}-ServiceMetrics
    log_stream_prefix   ServiceMetrics-${HOSTNAME}
    log_key             log
    log_format          json/emf
    auto_create_group   false
    retry_limit         3
    endpoint            ${CLOUDWATCH_ENDPOINT}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant