在cente OS中,安装rsyslogV8,v8.0的话才支持把日志发送的kafka。rsyslog -v 查看当前的版本,默认的版本都比较低。
配置一下yum源, cd /etc/yum.repos.d/ 执行 vi CentOS-Media.repo ,在文件底部添加一下yum网络源配置
[rsyslog_v8]
name=Adiscon CentOS- releasever−localpackagesfor basearch
baseurl=http://rpms.adiscon.com/v8-stable/epel- releasever/ basearch
enabled=1
gpgcheck=0
gpgkey=http://rpms.adiscon.com/RPM-GPG-KEY-Adiscon
protect=1
安装rsyslog:
yum install rsyslog rsyslog-kafka.x86_64
查看rsyslog版本,rsyslog -v
rsyslogd 8.21.0, compiled with:
PLATFORM: x86_64-redhat-linux-gnu
PLATFORM (lsb_release -d):
FEATURE_REGEXP: Yes
GSSAPI Kerberos 5 support: No
FEATURE_DEBUG (debug build, slow code): No
32bit Atomic operations supported: Yes
64bit Atomic operations supported: Yes
memory allocator: system default
Runtime Instrumentation (slow code): No
uuid support: Yes
Number of Bits in RainerScript integers: 64