There is no [OUT] messages in Alloy GUI

Hi,

After some time, and several changes I see that new entries are coming in [IN] to Alloy GUI for Live debugging, however in the same view I do not see any [OUT] to Grafana Loki. I tried to remove positions.yaml file to clean the offset, restart alloy service etc.

Is it something wrong with my config?

loki.write “grafana_loki” {
endpoint {
url = “”
}
}

local.file_match “coin” {
path_targets = [
{
path” = “/usr/logs/report/*”,
“job” = “coin”,
},
]
sync_period = “5s”
}

loki.source.file “log_scrape” {
targets = local.file_match.coin.targets
forward_to = [loki.process.filter_logs.receiver]
}

loki.process “filter_logs” {
forward_to = [loki.write.grafana_loki.receiver]

stage.multiline {
firstline = ^Traceback \(most recent call last\):
max_wait_time = “3s”
}

stage.regex {
expression = “(?i)(?PERROR|WARN|INFO)\s+(?P[a-zA-Z0-9_.]+)”
}

stage.match {
selector = “{level!="ERROR"}”
action = “drop”
}

stage.regex {
source = “filename”
expression = “(?P/usr/.+/)(?P[^/]+)$”
}

stage.labels {
values = {
level = “level”,
module = “module”,
filename = “filename”,
path = “path”,
}
}

stage.limit {
rate = 10
burst = 50
}
}

logging {
level = “debug”
}

Now I’ve been thinking, even if I restart the Alloy service in a loop and delete the positions.yaml file beforehand, maybe it’s not reading new data to Loki because it already did that? No, no, but that’s exactly why I delete that positions.yaml file - so it starts reading from the beginning, so I don’t understand - [IN] is visible, [OUT] is not visible, Loki is empty, but Alloy is receiving. I would just like to test this now, I even created a dummy.log file and injected a short ERROR there for it to catch, and I can see this error in the Alloy GUI, but not in Loki anymore.

I see a couple of errors (for example I don’t see where any of the label came from), but it shouldn’t prevent logs from being sent. Did you verify logs were being sent to Grafana cloud or no?

Please also share a sample of your logs and I can test your configuration.

Actually, during my tests I commented out one block for regex with those labels, but that was because I don’t need to use them. I just forgot to remove the references to them.

Anyway, now I can see that the logs are going out. I changed so many things that I don’t know what exactly affected it, but if I understand correctly, the simplest reason why I was seeing only [IN] and not [OUT] could be that one of the blocks wasn’t passing the logs further to Loki (e.g., regex)? That’s why I wasn’t seeing [OUT], am I right?

Honestly I can’t comment on how the UI displays the pipelines, I don’t actually use the UI very much.

1 Like