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!
HAProxy log customization requires a minimum of haproxy 1.5 dev17
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
(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.