Create a log file for Haproxy

Source: Internet
Author: User
Tags haproxy rsyslog
  1. Background introduction:
    By default, the Haproxy configuration does not generate log files, without running logs, to determine whether the system is running smoothly and cannot initiate a pre-judgment failure
  2. To create the Haproxy log file, follow these steps
    Vi/etc/rsyslog.conf
    Uncomment the following 2 lines:
    $ModLoad IMUDP
    $UDPServerRun 514
    and add the following line configuration
    $UDPServerAddress 127.0.0.1
    Create a haproxy.conf configuration file
    Touch/etc/rsyslog.d/haproxy.conf
    Add the following 3 lines of log configuration file
    local2.*/var/log/haproxy.log
    Local2.=info/var/log/haproxy-info.log
    Local2.notice/var/log/haproxy-allbutinfo.log
  3. Restart Rsyslog Service
    Service Rsyslog Restart
  4. As follows

Create a log file for Haproxy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.