Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Configuring Haproxy log support (syslog logging support)     - Linux shell in back quotes (`) Application (Linux)

- Python class of operator overloading (Programming)

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

- RHEL 5.7 Yum configure local source [Errno 2] No such file or directory (Linux)

- Linux network monitoring strategy (Linux)

- Preview function to confirm the stop resource Oracle 12c new feature crsctl (Database)

- Infinispan 8 new Redis cache storage implementation (Linux)

- RHEL (RedHat) 6.3 using EPEL Yum source (Linux)

- Linux Command study manual - GPG command (Linux)

- MySQL query optimization: profile function (Database)

- FFmpeg compiled with only H264 decoding library (Programming)

- Oracle ORA-01691 error message, a single data file size limit problem (Database)

- Seven kinds of DDoS attack methods and techniques Defensive (Linux)

- Python console achieve progress bar (Programming)

- Using IE can also be easily remotely control the computer (Linux)

- Ubuntu 14.04 LTS next upgrade gcc to gcc-4.9, gcc-5 version (Linux)

- PHP interview questions of design patterns (Programming)

- RHEL7.0 configuration CD-ROM to the local YUM (Linux)

- Spring-depth understanding of the various annotations (Programming)

- OpenSSL for secure transmission and use of skills of files between Windows and Linux (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:      
 
- Bash code injection attacks through a special environment variable (Linux)
- Spark source code compiler package (Linux)
- Import and export myloader accelerate mydumper (Database)
- JQuery implements the same content merge cells (Programming)
- How to set up HTTPS policies for older browsers (Server)
- Analysis of MySQL High Availability (Database)
- Using C ++ Container Templates in Shared Memory (Programming)
- Actual custom yum repository ---- gem commands commonly used parameters (Linux)
- mysql_config_editor encryption and decryption of the new features of MySQL realization (Database)
- Overall Physical Migration of Oracle Database with (Database)
- Ubuntu server 8.04 Firewall Guide (Linux)
- How to use Evernote in the Linux command line (Linux)
- Ubuntu 14.10 Apache installation and configuration (Server)
- How to upgrade Docker 1.6 on Fedora / CentOS (Server)
- Protobuf compiled and used on the Ubuntu 14.04 (Programming)
- How to configure Proftpd server on Fedora 22 (Server)
- Installation configuration CUDA under Ubuntu 14.04 (Linux)
- How to display a dialog Bash Shell script (Programming)
- KVM usb passthrough configuration (Linux)
- Linux system boot process ARM platforms (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.