Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Configuring Haproxy log support (syslog logging support)     - Thinking in Java study notes - initialization and cleanup (Programming)

- C ++ casts New Standard Comments (Programming)

- Build ASP.NET 5 development environment in Ubuntu (Server)

- Swift acquaintance of values and references, the circular reference, Agent Precautions (Programming)

- Ubuntu program using the Sound Recorder (Linux)

- Ubuntu 14.10 / 14.04 / 12.04 How to install Kodi 14.0 RC3 (Linux)

- Ubuntu 14.04 to install Blender 2.71 (Linux)

- Linux how to view your JDK installation (Linux)

- Ubuntu 14.10 Server configuration wireless Internet access (Server)

- MySQL function: group_concat () function (Database)

- MySQL service failed to start thinking of settlement under CentOS7 (Database)

- What is Java EE (Programming)

- Using a proxy method under Linux terminal (Linux)

- Oracle 11g partition maintenance (Nice) - Truncating And Partitions (Database)

- Python type way of comparison (Programming)

- Java abstract class instantiation (Programming)

- Installation of Theano + CUDA under Ubuntu (Linux)

- Oracle database physical file backup / restore (Database)

- Binary search and modification (Programming)

- About MongoDB query method according to fuzzy field (Database)

 
         
  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:      
 
- xargs Detailed description (Linux)
- Vmstat command Linux Performance Monitoring (Linux)
- SYN attack hacker attack and defense of the basic principles and prevention technology (Linux)
- Linux operating system Start Tutorial: Xmanager Remote Access Linux graphical interface (Linux)
- Docker + Nginx + Tomcat7 simple load balancing configuration (Server)
- MySQL Online DDL tools of pt-online-schema-change (Database)
- xCAT install and update software (Linux)
- Linux directory permissions to read and execute permissions difference (Linux)
- Install Unity 8 preview version of the desktop in Ubuntu (Linux)
- Docker + OpenvSwitch build experimental environment VxLAN (Server)
- Using Android Studio integrated development environment to build Android (Linux)
- Linux using TCP-Wrapper Service Management (Linux)
- Linux Getting Started Tutorial: How to set up a static MAC address on VMware ESXi virtual machine (Mobile)
- 32-bit and 64-bit integer in PHP and MySQL range (Database)
- Go powerful development server simple example (Server)
- The specified user to execute commands under Linux (Linux)
- Linux System Getting Started Learning: the curl set custom HTTP header (Linux)
- Intrusion prevention network server security maintenance tips (Linux)
- Linux Command Tutorial: Ubuntu apt-get command (Linux)
- CentOS 6.6 x64 Oracle Database 11gR2 RAC automated installation scripts (Database)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.