I am trying to setup remote logging on my FreeBSD machine with HAproxy.
Remote server is running Debian with docker and Graylog as logging server.
Greylog does receive my messages, but they will arrive in Graylog one hour later because Graylog expect the timestamp to be in UTC, and my timezone is +1. So when my FreeBSD server sends a message at 16:00 it will be received in my Graylog server but it will not show until one hour later because Graylog thinks the time is 16:00 UTC so it will add one hour and show the message at 17:00. Well, thats the only explanation I have..
FreeBSD config:
/etc/rc.conf
/usr/local/etc/syslog.d/haproxy.conf
/usr/local/etc/haproxy.conf
I have tried both to log to local syslogd and have it send it's logs over to my Graylog server and to let HAProxy log directly to Graylog. Using HAProxy to directly log I will at least get something in my logs.
does work, but the message will appear in Graylog at 11:00, one hour later.
if I have "*.* @192.168.0.20" in /usr/local/etc/syslog.d/remote.conf then logger "My message @10:00" will work, but as above, appear one hour later.
Remote server is running Debian with docker and Graylog as logging server.
Greylog does receive my messages, but they will arrive in Graylog one hour later because Graylog expect the timestamp to be in UTC, and my timezone is +1. So when my FreeBSD server sends a message at 16:00 it will be received in my Graylog server but it will not show until one hour later because Graylog thinks the time is 16:00 UTC so it will add one hour and show the message at 17:00. Well, thats the only explanation I have..
FreeBSD config:
/etc/rc.conf
syslogd_enable="YES"
syslogd_flags="-v -b localhost -C -O rfc5424"
/usr/local/etc/syslog.d/haproxy.conf
Code:
local0.* /var/log/haproxy.log
local0.* @192.168.0.20
/usr/local/etc/haproxy.conf
Code:
global
# log 127.0.0.1:514 local0 debug
log 192.168.0.20:514 len 8096 local0 debug
log-send-hostname
defaults
log global
option httplog
I have tried both to log to local syslogd and have it send it's logs over to my Graylog server and to let HAProxy log directly to Graylog. Using HAProxy to directly log I will at least get something in my logs.
Code:
logger -h 192.168.0.20 "My message @10:00"
if I have "*.* @192.168.0.20" in /usr/local/etc/syslog.d/remote.conf then logger "My message @10:00" will work, but as above, appear one hour later.