Alloy to loki error

After configuring alloy to send logs to loki , I am getting following error in alloy pod logs.

ts=2025-11-06T10:52:12.297239627Z level=error msg=“final error sending batch, no retries left, dropping data” component_path=/ component_id=loki.write.grafana_loki component=client host=eric-csw-sre-ops-loki-distributor:3100 status=-1 tenant=“” error=“Post “http://eric-csw-sre-ops-loki-distributor:3100/loki/api/v1/push\”: context deadline exceeded”

I checked the network connectivity using curl pod its working. loki health checked , its working fine. Both pods alloy and loki are in same namespace.

What could be the issue here.

I would double check and make sure your alloy pod can actually hit your Loki endpoint.

Usually you’d go through a gateway of some sort, but I am not sure how you deployed Loki.

@tonyswumac Thanks for the response, however I figured out that I had configured the egress network policy for outgoing connection on port 3100. And that was blocking all other outgoing traffic , so once it is removed , it started working.