How to generate HAProxy specific logs using rsyslog with high precision timestamp of upto milliseconds ?
Issue
- By default
rsyslogshows logs with timestamp maximum uptosecondsvalue. - After configuring
rsyslogfor high precision as per kbase #296743 all the logs except HAProxy showed timestamp in milliseconds as below
2017-07-05T12:51:25.388488+05:30 HOSTNAME sysad: THIs
2017-07-05T12:51:35.135463+05:30 HOSTNAME su: (to root) sysad on pts/1
--> 2017-07-05T12:51:53+05:30 HOSTNAME haproxy[4434]: 172.X.X.X:40526 [05/Jul/2017:12:51:53.352] 172.X.X.X-frontend example.host.com-backend/172.X.X.X [172.X.X.X:6580] 1/0/84 2163 -- 0/0/0/0/0 0/0
- Need HAProxy logs as well to be generated with high precision of
milliseconds.
Environment
- Red Hat Enterprise Linux 7.X
- rsyslog
- HAProxy
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
