Send data to loki via AWS EventBridge, Azure EventGrid or simple webhooks

Hi,

I have a service that can send log streams to AWS EventBridge, Azure EventGrid or as simple webhook. Is there any option to connect one of the services to loki to drop the logs?

BR and thanks in advance

Yes, e.g. AWS EventBridgeAWS LambdaLoki. A few lines of Lambda code in your favorite language and it should be possible.

@jangaraj thanks for your answer :slight_smile:
Would you use a post request to https://logs-prod-xxx.grafana.net/loki/api/v1/push endpoint or how would you send the logs from the lambda?

Yes, random python example from the internet:

Of course real code for your use case depends on your input format. “sending logs to AWS EventBridge” is vague definition.

1 Like

Thank you! That helps!