Hello alloy Users,
I setup my alloy / loki lab and wanted to receive my syslog messages with alloy and transfer them to loki. My setup is working fine, but I am not able to set labels based the incomming connection or hostname.
The log looks like this:
Jul 26 10:40:51 MU-IT-Logserver alloy[25186]: ts=2024-07-26T08:40:51.274315239Z level=info component_path=/ component_id=loki.echo.debug receiver=loki.echo.debug entry=“<190>1 2024-07-26T08:40:13.205566Z XXXXXS81 cdpd 2891 - - Event|8904|LOG_INFO|MSTR|1|CDP neighbor 0c:11:67:d2:e7:99 is updated on 1/1/49” labels=“{category="switch", component="loki.source.syslog", logserver="XX-XX-Logserver"}”
XXXXXS81 is the hostname where I want to create a label from.
I tried working with “__syslog_connection_ip_addres” and a label section without any luck.
I have another otel collector / clickhouse setup where a hostname setup for the same source is extracted correctly.
What is the alloy way to get the hostname/ip of the loki.syslog collector to a label?
Thank you very much for the help
FLorian