Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Configuring Haproxy log support (syslog logging support)     - Build Docker based MongoDB replication cluster environment (Database)

- CentOS 7 open ports (Linux)

- DOM event handlers add notes (Programming)

- Linux operating system security management skills notes (Linux)

- Oracle study notes view (Database)

- Ubuntu installation module Python rq (Linux)

- Ubuntu Series Installation Docker (Linux)

- Linux Log Clear (Linux)

- WebLogic administrator account and reset the password (Database)

- EXP-00091: Exporting questionable statistics Processing Method (Database)

- MySQL optimization resulting order by using filesort (Database)

- Oracle Database Performance Optimization of memory disk (Database)

- Java object serialization and deserialization (Programming)

- Examples 14 grep command (Linux)

- Linux shell script to adjust the Task Scheduler (Linux)

- Samba file sharing server set up (Server)

- How to fix fatal error: security / pam_modules.h: No such file or directory (Linux)

- Windows SmartGit installation (Linux)

- How to find the available network adapter on Ubuntu (Linux)

- Windows Remote Desktop Management CentOS 6.4 (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:      
 
- LVM mirrored logical volume to achieve (Linux)
- Zookeeper Rights Management and Quota Management (Server)
- Iscsi package is installed on RHEL 6.3 x86-64 systems (Linux)
- Several SQL Server data migration / Export Import Practice (Database)
- Bash command substitution (Programming)
- Eclipse distributed management using GitHub project development (Linux)
- Why you should choose Python Programming (Programming)
- Linux cd command Detailed (Linux)
- Linux, Firefox unloading and installation and upgrade (Linux)
- Bash variable expansion modifier (Programming)
- shell script: MySQL startup script simple (Database)
- AIX system file security aspects (Linux)
- How to build a custom exclusive Ubuntu Live CD (Linux)
- Simple steps allows you to build a more secure Linux server (Linux)
- How do you turn on and off IPv6 address on Fedora (Linux)
- Chkconfig set boot start under Linux (Linux)
- Python Django direct implementation of sql statement (Programming)
- Linux Services Comments (Linux)
- How to interactively create a Docker container (Server)
- CentOS yum install LAMP (Server)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.