Syslog+Fluentd+InfluxDB日志收集系统搭建
2017-10-14 11:59
891 查看
环境配置
节点 | 配置 | 类型 | 操作系统 |
---|---|---|---|
Sched | 2G 2CPU 50GB ens3=>192.168.200.11 | KVM虚拟机 | CentOS 7 |
Nova | 4G 2CPU 50GB ens3=>192.168.2000.12 | KVM虚拟机 | CentOS 7 |
Sched节点配置
配置InfluxDB软件源
# cat <<EOF | sudo tee /etc/yum.repos.d/influxdb.repo [influxdb] name = InfluxDB Repository - RHEL \$releasever baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable enabled = 1 gpgcheck = 1 gpgkey = https://repos.influxdata.com/influxdb.key EOF # yum makecache
安装InfluxDB
# yum install influxdb -y ### 设置开机启动 # systemctl start influxdb # systemctl enable influxdb # systemctl stop firewalld # systemctl disable firewalld ### 查询InfluxDB默认配置 # influxd config ### 开启web访问,URL地址http://192.168.200.11:8083 # vim /etc/influxdb/influxdb.conf [admin] enabled = true # systemctl restart influxdb ### 如果不是使用标准的默认目录,需要手动修改目录权限 # chown -R influxdb:influxdb /mnt/influx # chown -R influxdb:influxdb /mnt/db ### 创建test数据库 # influx > CREATE DATABASE test > use test
安装Fluentd
# yum install epel-release # yum makecache # curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh
安装InfluxDB插件
# td-agent-gem install fluent-plugin-influxdb
配置Fluentd
# vim /etc/td-agent/td-agent.conf <source> type syslog port 42185 tag system </source> <match system.*.*> type influxdb dbname test flush_interval 10s host 192.168.200.11 port 8086 </match> # systemctl restart td-agent
Nova节点配置
配置rsyslog
# wget http://rpms.adiscon.com/v8-stable/rsyslog.repo -O /etc/yum.repos.d/rsyslog.repo # yum makecache # yum install rsyslog # vim /etc/rsyslog.conf *.* @192.168.200.11:42185 # systemctl restart rsyslog
验证安装
### 在Nova节点执行 # logger -p "local3.notice" "fwd test" ### 在Sched节点执行 # influx > USE test > SHOW MEASUREMENTS > SELECT * FROM "system.local3.notice"
参考文档
相关文章推荐
- mac 环境安装日志收集系统搭建(Fluent,ES,Kibana)
- 基于Centos 6.5+MariaDB+loganalyzer+syslog搭建远程系统日志收集和分析环境
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- 利用kiwi_syslog_软件为vigor_防火墙路由器搭建日志服务系统100
- Fluentd (td-agent) 日志收集系统
- ELK1-日志收集分析系统环境搭建
- 腾讯云搭建日志收集系统
- 基于flume+kafka+storm日志收集系统搭建
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- 快速搭建应用服务日志收集系统(Filebeat + ElasticSearch + kibana)
- 基于Elasticsearch+Fluentd+Kibana的日志收集分析系统搭建与应用
- 用Kibana+Logstash+Elasticsearch快速搭建实时日志查询、收集与分析系统
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- Fluentd (td-agent) 日志收集系统
- 用Kibana和logstash快速搭建实时日志查询、收集与分析系统
- linux syslog 日志采集系统搭建
- elasticsearch + logstash + kibana 搭建实时日志收集系统【原创】
- 从零开始搭建一个ELKB日志收集系统