Skip to content
New issue

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

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

Already on GitHub? # to your account

RAW_FORMAT environment variable not working #481

Open
ammar-mop opened this issue May 27, 2020 · 1 comment
Open

RAW_FORMAT environment variable not working #481

ammar-mop opened this issue May 27, 2020 · 1 comment

Comments

@ammar-mop
Copy link

I am trying to route my logs to Amplitude. The Amplitude API requires a JSON string sent, so I have tried formatting the RAW_FORMAT env variable to the appropriate string. However, when I inspect my logs via the --publish option, there seems to be no change in the format, whichever template I set. This eventually leads the logs not being sent to Amplitude.

This is the command that I run:

docker run --name="logspout" --env RAW_FORMAT='{ "api_key" : "MY_API_KEY", "events" : [{{ toJSON .Data }}] }' --volume=/var/run/docker.sock:/var/run/docker.sock --publish=127.0.0.1:8000:80 gliderlabs/logspout raw://api.amplitude.com:443/2/httpapi
@relistan
Copy link

It definitely works for the endpoint you send them to when sending e.g. over syslog.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants