[syslog-ng] Sending logs to Loki
Alexey Vlasov
renton at renton.name
Tue May 6 12:10:07 UTC 2025
Hi,
in accordance with:
https://syslog-ng.github.io/admin-guide/070_Destinations/125_Loki/001_Loki_options.html
I try to send logs to my loki server
@version: 4.8
@include "scl.conf"
options {
chain_hostnames(off);
use_fqdn(no);
keep_hostname(yes);
dns-cache-expire(87600);
};
source s_internal {
internal();
};
destination d_loki {
loki(
url("my.loki.ip.here:13100")
port(13100)
labels(
"server" => "my-syslog-server",
)
template("${MESSAGE}")
auth(insecure())
);
};
log {
source(s_internal);
destination(d_loki);
flags(final);
};
but always get:
2025-05-06 15:00:50.373 Error establishing connection to server;
driver='d_loki#0', worker_index='0', location=
Test requests through curl pass well (from syslog host).
Dump from tcpdump:
- from syslog-ng:
.U.Q...5PRI * HTTP/2.0
SM
..$.....................?.....?...... .................?..
- response from loki
...-.U.QHTTP/1.1 301 Moved Permanently
Location: /%2A
Date: Tue, 06 May 2025 11:56:42 GMT
Content-Length: 0
Connection: close
what could be wrong with my conf?
Thanks in advance.
More information about the syslog-ng
mailing list