From owner-freebsd-stable@freebsd.org Mon Jun 24 14:44:29 2019 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFD7515CF6FD for ; Mon, 24 Jun 2019 14:44:28 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from gromit.dlib.vt.edu (gromit.dlib.vt.edu [128.173.49.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "gromit.dlib.vt.edu", Issuer "Chumby Certificate Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C17470F76 for ; Mon, 24 Jun 2019 14:44:28 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from pmather-dld-1.lib.vt.edu (pmather-dld-1.lib.vt.edu [128.173.51.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gromit.dlib.vt.edu (Postfix) with ESMTPSA id 184C3251; Mon, 24 Jun 2019 10:44:27 -0400 (EDT) Content-Type: text/plain; charset=us-ascii; delsp=yes; format=flowed Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: haproxy syslog comptible From: Paul Mather In-Reply-To: <20190624144239.GK2161@zxy.spb.ru> Date: Mon, 24 Jun 2019 10:44:26 -0400 Cc: freebsd-stable@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: References: <20190624141721.GK47119@zxy.spb.ru> <30C12D55-56E1-43BC-90FE-D870BF811718@gromit.dlib.vt.edu> <20190624144239.GK2161@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: 2C17470F76 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dmarc=fail reason="" header.from=vt.edu (policy=none) X-Spamd-Result: default: False [-2.85 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[vt.edu : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-0.71)[ip: (-1.78), ipnet: 128.173.0.0/16(-0.89), asn: 1312(-0.80), country: US(-0.06)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: chumby.dlib.vt.edu]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.63)[-0.632,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:1312, ipnet:128.173.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jun 2019 14:44:29 -0000 On Jun 24, 2019, at 10:42 AM, Slawa Olhovchenkov wrote: > On Mon, Jun 24, 2019 at 10:35:03AM -0400, Paul Mather wrote: > >> On Jun 24, 2019, at 10:17 AM, Slawa Olhovchenkov wrote: >> >>> I am use haproxy logged to syslog and have log lines like this: >>> >>> Jun 24 17:04:25 ha01 haproxy[32508]: 193.34.87.146:57625 >>> [24/Jun/2019:17:04:23.277] balancer~ default-pool/main 0/0/0/-1/2012 504 >>> 194 - - sH-- 888/888/4/4/0 0/0 "POST /vs HTTP/1.1" >>> >>> Is this posible to learn syslogd to use mileseconds timestamps? >>> _______________________________________________ >>> freebsd-stable@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-stable >>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >> >> >> Run syslogd with "-O syslog" to get timestamps logged with microsecond >> precision (as well as time zones). You can add that to your >> "syslogd_flags" setting in /etc/rc.conf. (See man syslogd for details.) >> >> Note that the format of syslog entries changes with "-O syslog". You get >> logs like this: >> >> <38>1 2019-04-12T10:43:56.525458-04:00 xxxxx.xxxxx.net sshd 1253 - - >> Received signal 15; terminating. >> <38>1 2019-04-12T10:48:05.058693-04:00 xxxxx.xxxxx.net sshd 1238 - - >> Server >> listening on :: port 22. >> >> >> (Note that the precision also depends upon the client application logging >> to syslog.) > > I mean you talk about different syslogd, not from FreeBSD: > > syslogd: illegal option -- O > usage: syslogd [-468ACcdFknosTuv] [-a allowed_peer] > [-b bind_address] [-f config_file] > [-l [mode:]path] [-m mark_interval] > [-P pid_file] [-p log_socket] I guess this works only on FreeBSD 12 and later, then. What version are you running? Cheers, Paul.