Alloy not fast enough to follow log file

Hi team I’m using alloy to replace promtail as the log collector, and I am wondering if alloy has a metric that indicates it can’t keep up with the log file?

I met an issue that alloy was not able to follow the log writing speed, for example when the hour is end it only read and sends log of 40m position. And when the log rotated the rest 20m’s logs are lost. This lost will not be reflected within droped_lines metric since it hasn’t read it

Regards

Hello! We are seeing the same problem. Anyways you’re able to get around this?

Thanks

Hi folks, which Alloy components are you currently using, and which version of Alloy? The most recent Alloy release ships a number of Loki component improvements, which might be helpful here.

Components also ship with certain debug metrics that can help monitor performance, for example these debug metrics for loki.source.file. We also have our Alloy Health integration that ships with Loki Components dashboard, which can give an idea of incoming latency and other performance indicators. That said, I don’t believe we have a specific metric that specifically shows that Alloy cannot keep up with the incoming data, but someone feel free to chime in if that’s not the case

As a sanity check, I would also check for any resource saturation (CPU/memory/IO) issues that might be causing bottlenecks within Alloy

Just to tack onto the above, it’s worth noting that the efficiency of Loki components is a known issue within Alloy - and there are some ongoing discussions and streams of work on improving this :slight_smile: