Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Configuring Haproxy log support (syslog logging support)     - Linux user login ban (Linux)

- OpenVPN offsite interconnecting room availability and load balancing solution (Server)

- Linux (CentOS) directory file management and file system file compression packing (Linux)

- Setting Linux desktop environment, achieve HiDPI display support (Linux)

- linux system optimization and security configuration (Linux)

- Common data structures and functions of Linux process scheduling (Programming)

- Oracle Sql Loader tool has shown signs (Database)

- Ubuntu 15.10 install the latest Arduino IDE 1.6.7 (Linux)

- Linux dual physical network card set to a virtual NIC (Linux)

- Java Cookie Comments (Programming)

- JBoss7 configuration - Supports IPv4 and IPv6 dual-stack environment (Server)

- Oracle database file path changes (Database)

- Linux disk partition batch format mount script (Linux)

- Good wireless network security information spread in the air (Linux)

- JDK installation and configuration environment variable under linuxb (Linux)

- Getting the Linux shell flow control statements (Programming)

- Linux System Getting Started Tutorial: Installing Git on Linux (Linux)

- SSH without password (Linux)

- Java factory pattern (Factory mode) (Programming)

- Vi syntax highlighting settings (Linux)

 
         
  Configuring Haproxy log support (syslog logging support)
     
  Add Date : 2018-11-21      
         
       
         
  System CentOS 6.x

Configure logging support Haproxy

cp /etc/rsyslog.conf /etc/rsyslog.conf`date +% F`
ll /etc/rsyslog.con*
cat >> /etc/rsyslog.conf< #haproxy
local0. * /application/haproxy/logs/haproxy.log
#end
EOF

## Should be specified in the configuration file is haproxy local0, so here choose local0. The following configuration haproxy corresponding configuration file:

===============

log 127.0.0.1:514 local0 warning

## Global logging configuration ,, log keyword specifies the syslog 127.0.0.1:514 Service local0 log level, where the choice is warning, do not use general info

================

# Modify / etc / sysconfig / rsyslog reads as follows:

[Root @ MASTER ~] # tail -2 / etc / sysconfig / rsyslog
#SYSLOGD_OPTIONS = "- C 5"
SYSLOGD_OPTIONS = "- c 2 -m 0 -r -x"
[Root @ MASTER ~] #

# Reboot /etc/init.d/rsyslog

/etc/init.d/rsyslog restart

# 6.4 is not the default port

netstat -lntup
 /etc/init.d/rsyslog restart

######## Rsyslog.conf allowed to modify appears port

egrep 'UDPServerRun | ModLoad' /etc/rsyslog.conf
sed -i 's / # $ UDPServerRun 514 / $ UDPServerRun 514 / g' /etc/rsyslog.conf
sed -i 's / # $ ModLoad imudp / $ ModLoad imudp / g' /etc/rsyslog.conf
sed -n -e '/ $ ModLoad imudp / p' -e '/ $ UDPServerRun / p' /etc/rsyslog.conf

# Reboot /etc/init.d/rsyslog

/etc/init.d/rsyslog restart
  netstat -lntup | grep rsyslog
  
[Root @ MASTER ~] # netstat -lntup | grep rsyslog
udp 0 0 0.0.0.0:514 0.0.0.0:* 5031 / rsyslogd
udp 0 0 ::: 514 ::: * 5031 / rsyslogd
[Root @ MASTER ~] #
  ====================
[Root @ MASTER ~] # cat /application/haproxy/logs/haproxy.log
Nov 6 10:58:49 127.0.0.1 haproxy [5049]: Stopping proxy test in 0 ms.
Nov 6 10:58:49 127.0.0.1 haproxy [5049]: Proxy test stopped (FE: 0 conns, BE: 0 conns).
Nov 6 10:58:58 127.0.0.1 haproxy [5055]: Stopping proxy test in 0 ms.
Nov 6 10:58:58 127.0.0.1 haproxy [5055]: Proxy test stopped (FE: 0 conns, BE: 0 conns).
[Root @ MASTER ~] #

### Note that if you still can not log, remember to turn off selinux
     
         
       
         
  More:      
 
- Linux user groups, file permissions Detailed (Linux)
- Modify Linux terminal prompt path length (Linux)
- How to protect your eyes automatically adjust the screen brightness on Linux (Linux)
- CentOS7 yum install third-party source EPEL (Linux)
- Ubuntu install ruby (Linux)
- LAMP environment to build Apache, MySQL, PHP under Ubuntu (Server)
- PostgreSQL-- run Supervisord on Docker in Ubuntu (Database)
- Features and prevention methods elaborate network security grayware (Linux)
- Heartbeat cluster components Overview (Server)
- How to install OpenOffice Ubuntu or Linux Mint (Linux)
- How to back up Debian system backupninja (Linux)
- Ubuntu Apache virtual host configuration (Server)
- Linux operating system ARP Spoofing Defense (Linux)
- Setting Derby as Linux / Windows running as a service from the start (Server)
- Some security configuration of Linux systems (Linux)
- MySQL Tutorial: Some optimized for I / O memory areas (Database)
- Ubuntu install the camera driver (Linux)
- Download Google Android source code under Ubuntu 4.4 (Linux)
- Hadoop2.6.3 build clusters and the development of MapReduce WIN7 by Eclipse on Linux demo (Server)
- How to manage the time and date at systemd Linux systems (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.