Bug 1223792 - [RFE] add timestamps to HAProxy logs
Summary: [RFE] add timestamps to HAProxy logs
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
medium
urgent
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-21 12:57 UTC by Evgheni Dereveanchin
Modified: 2019-12-16 04:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-24 23:02:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Evgheni Dereveanchin 2015-05-21 12:57:35 UTC
Description of problem:
Currently haproxy logs in app-root/logs/haproxy.log do not contain time stamps. This makes it impossible to compare them to other events during later analysis. The proposal is to add such time stamps to the log produced by HAProxy. This RFE proposes to address this limitation by adding time stamps to such messages.

Version-Release number of selected component (if applicable):
OpenShift 2.2
haproxy-1.4.22-5.el6op.x86_64

How reproducible:
Always

Steps to Reproduce:
1. create scalable app
rhc app-create scalable php-5.4 -s
2. ssh to app
rhc ssh scalable
3. check the log
tail app-root/logs/haproxy.log

Actual results:
[ALERT] 130/153642 (31927) : proxy 'demo' has no server available! 

Expected results:
2015-05-14 17:00:00,400 [ALERT] 130/153642 (31927) : proxy 'demo' has no server available!

Comment 3 Jhon Honce 2015-06-12 23:28:41 UTC
HAProxy log customization requires a minimum of haproxy 1.5 dev17

Comment 11 Timothy Williams 2015-11-24 23:02:44 UTC
Haproxy 1.4 does not support customizing the log output. You only have a few options to choose from: default (specifying no logging option), "tcplog", and "httplog". These options come with a specific set of fields that are printed in each log message. The fields that are printed cannot be customized.

In the link provided by Jhon[0], the log messages shown have timestamps. These were added by syslog. The documentation does not detail the timestamp field and mentions that syslog will add fields before haproxy log messages. We do not use syslog to log from haproxy, so no timestamps are added.

Unfortunately, there is nothing we can do about this bug at this time without upgrading the haproxy cartridge to at least haproxy-1.5.dev8.

See http://blog.haproxy.com/2012/10/29/haproxy-log-customization/ for the customization options available with haproxy-1.5.dev8

There are currently no plans to update the haproxy-1.4 cartridge to haproxy-1.5.x for OpenShift v2. Therefore, I am closing this WONTFIX.

[0] https://cbonte.github.io/haproxy-dconv/configuration-1.4.html#8.2

Comment 12 Josep 'Pep' Turro Mauri 2015-11-25 17:11:15 UTC
(In reply to Timothy Williams from comment #11)
> In the link provided by Jhon[0], the log messages shown have timestamps.
> These were added by syslog. The documentation does not detail the timestamp
> field and mentions that syslog will add fields before haproxy log messages.
> We do not use syslog to log from haproxy, so no timestamps are added.

Maybe worth mentioning that haproxy logs in the gears are processed by logshifter, and logshifter can be configured to send logs to syslog instead of (or in addition to) local files inside the gear.

Just a reminder in case it helps.


Note You need to log in before you can comment on or make changes to this bug.