From owner-freebsd-stable@freebsd.org Mon Jun 24 14:35:10 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 D2A6715CF13A for ; Mon, 24 Jun 2019 14:35:10 +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 7D1C470903 for ; Mon, 24 Jun 2019 14:35:09 +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 7818924D; Mon, 24 Jun 2019 10:35:03 -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: <20190624141721.GK47119@zxy.spb.ru> Date: Mon, 24 Jun 2019 10:35:03 -0400 Cc: freebsd-stable@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <30C12D55-56E1-43BC-90FE-D870BF811718@gromit.dlib.vt.edu> References: <20190624141721.GK47119@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: 7D1C470903 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dmarc=fail reason="" header.from=vt.edu (policy=none) X-Spamd-Result: default: False [-2.89 / 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.73)[ip: (-1.84), ipnet: 128.173.0.0/16(-0.92), asn: 1312(-0.83), country: US(-0.06)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[chumby.dlib.vt.edu,gromit.dlib.vt.edu]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.65)[-0.647,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:35:11 -0000 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.) Cheers, Paul.