RE: [syslog-ng]syslog-ng&logrotate
When you rotate the logs you have to send syslog-ng a SIGHUP to make it look at your new file. If you are using Linux if you look in /etc/logrotate.d there is a file called syslog, make sure it is picking up the correct pid file so that it is HUPing the right process on log rotation. Regards, Drew -----Original Message----- From: yannick.haguenier@tuxfamily.org [mailto:yannick.haguenier@tuxfamily.org] Sent: Thursday, July 10, 2003 7:03 AM To: syslog-ng@lists.balabit.hu Subject: [syslog-ng]syslog-ng&logrotate Hy, i have squid + syslog-ng 1.0.6.rc1 Syslog-ng look squid/access.log, and write log file (with date format) on a remote server (tcp). On squid there is a logrotate at 6 am. My pb : before the log rotate, all is good. After logrotate, syslog-ng don't write in the remote file. The last line appear in this file was create at 6am. The process run on the both server, and i have no error. If i run syslog-ng restart, syslog-ng write the ligne in remote file . the next error appear after the next logrotate. Does anyone know why this is happening? thanks _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
Hi All, my syslog-ng time is somehow set to GMT . I see the time off by 2 hours _*only*_ in the destination d_postgres* (with source s_tcp, s_udp) , in d_msg* destination (with source s_sys) the time is OK !?! I've installed a syslog-ng 1.6.0rc3 from src on a RH9 and i've interfaced it with a postgreSQL 7.3.2 ; I've set the crontab with "ntpdate -b time.ien.it" and it works ; I've configured the syslog-ng.conf with this options: ******************************************************************************** ############################################################################### options { sync (0); time_reopen (10); log_fifo_size (100); long_hostnames (on); use_dns (yes); use_fqdn (yes); create_dirs (yes); keep_hostname (yes); time_reap(12); gc_busy_threshold(768); use_time_recvd(0); }; ############################################################################### source s_sys { unix-stream ("/dev/log"); internal(); }; source s_udp { udp(); }; source s_tcp { tcp(); }; source s_local { internal(); }; ############################################################################### # destination d_files { file("/var/log/syslog-ng/$HOST/$FACILITY.$LEVEL" # template("$ISODATE $HOST $FACILITY $PRIORITY $PROCESS $MSG\n")); # }; destination d_msgs { file("/var/log/messages" template("$FULLDATE $HOST $FACILITY.$PRIORITY $MSG\n")); }; [...the output on file is OK with the local time] destination d_postgres { file("/var/spooldir/syslog2pgsql/fulllog.$YEAR.$MONTH.$DAY.$HOUR.$MIN.$SEC" template("INSERT INTO msg_table VALUES ('$FULLDATE','$FULLDATE','$HOST','$FACILITY', '$PRIORITY', '$MSG');\n") template_escape(yes) owner(postgres)); }; [... the output on DB is 2 hour WRONG :( ?? ] ********************************************************************************* Another think : if I set use_time_recvd(0) -> use_time_recvd(1) (???) the time in /var/log/messages becomes wrong to ????? Ciao and Thanks in Advance Roberto
participants (2)
-
Hamilton, Andrew
-
Roberto Re