-
Notifications
You must be signed in to change notification settings - Fork 538
Closed
Labels
Description
What's wrong?
Hello,
I use local.file_match to detect .gz files. loki.source.file and decompressor to decode .gz files.
If I delete a gz file which is on the disk I get a panic.
Steps to reproduce
Delete a .gz file which is monitored by local.file_match and loki.source.file
System information
RHEL 7 - Appliance
Software version
Grafana Alloy 1.8.1
Configuration
This is the part of my alloy config
local.file_match "filename" {
// Dateien, die erkannt werden sollen
path_targets = [
{__path__ = "/var/log/filename.1.gz"},
{__path__ = "/var/log/filename.2.gz"},
]
sync_period = "10s"
}
//
// ==========================================================================================================================
//
loki.source.file "filename" {
targets = local.file_match.filename.targets
file_watch {
min_poll_frequency = "1s"
max_poll_frequency = "16s"
}
decompression {
enabled = true
initial_delay = "10s"
format = "gz"
}
forward_to = [loki.relabel.filename.receiver]
}
Logs
panic: close of nil channel
goroutine 26318 [running]:
github.com/grafana/alloy/internal/component/loki/source/file.(*decompressor).updatePosition.func1()
/drone/src/internal/component/loki/source/file/decompresser.go:190 +0x105
github.com/grafana/alloy/internal/component/loki/source/file.(*decompressor).updatePosition(0xc00cb0d800)
/drone/src/internal/component/loki/source/file/decompresser.go:201 +0x267
created by github.com/grafana/alloy/internal/component/loki/source/file.(*decompressor).Run in goroutine 26315
/drone/src/internal/component/loki/source/file/decompresser.go:176 +0x4d1
panic: close of nil channel
goroutine 38433 [running]:
github.com/grafana/alloy/internal/component/loki/source/file.(*decompressor).updatePosition.func1()
/drone/src/internal/component/loki/source/file/decompresser.go:190 +0x105
github.com/grafana/alloy/internal/component/loki/source/file.(*decompressor).updatePosition(0xc00cb0d900)
/drone/src/internal/component/loki/source/file/decompresser.go:201 +0x267
created by github.com/grafana/alloy/internal/component/loki/source/file.(*decompressor).Run in goroutine 26314
/drone/src/internal/component/loki/source/file/decompresser.go:176 +0x4d1
Reactions are currently unavailable