1、ELK-WEB中文汉化版支持:(kibana所在机器执行)
Kibana WEB平台所有的字段均显示为英文,目前5.x版本默认没有中文汉化版插件或者汉化包(7.x版本支持汉化默认有汉化),感谢Github开源贡献开发了汉化包,汉化包插件地址:
https://github.com/anbai-inc/Kibana_Hanization
Kibana汉化方法此项目,适用于Kibana 5.x-6.x的任意版本,汉化过程不可逆,汉化前请注意备份! 汉化资源会慢慢更新完善,已汉化过的Kibana可以重复用此项目汉化更新的资源。
除一小部分资源外,大部分资源无需重启Kibana,刷新页面即可看到效果,Kibana汉化方法和步骤如下:
1)Github仓库下载Kibana中文汉化包,下载指令如下:
#git clone https://github.com/anbai-inc/Kibana_Hanization.git wget http://bbs.jfedu.net/download/Kibana_Hanization_2018.tar.gz tar xf Kibana_Hanization_2018.tar.gz
2)切换至Kibana_Hanization目录,并且执行汉化过程:
cd Kibana_Hanization/
python main.py /usr/local/kibana/ (此处为系统kibana安装路径)
2、Redis高性能加速实战:
wget http://download.redis.io/releases/redis-2.8.13.tar.gz tar zxf redis-2.8.13.tar.gz cd redis-2.8.13 make PREFIX=/usr/local/redis install cp redis.conf /usr/local/redis/
将/usr/local/redis/bin/目录加入至环境变量配置文件/etc/profile末尾。然后shell终端执行 source /etc/profile让环境变量生效:
export PATH=/usr/local/redis/bin:$PATH
nohup 后台启动及停止redis服务命令:
nohup /usr/local/redis/bin/redis-server /usr/local/redis/redis.conf & /usr/local/redis/bin/redis-cli -p 6379 shutdown
redis 监听端口改成0.0.0.0:(全网监听)
3、ELK收集MYSQL日志实战:(logstash客户端执行)
cd /usr/local/logstash/config/etc/, 创建如下配置文件,代码如下:
1) 日志采集-存入redis缓存数据库:
touch agent.conf input { file { type => "mysql-access" path => "/var/log/mysqld.log" } } output { redis { host => "localhost" port => 6379 data_type => "list" key => "logstash" } }
后台启动agent:
nohup /usr/local/logstash/bin/logstash -f agent.conf &
2)Redis数据-存入ES:
cd /usr/local/logstash/config/etc/;touch index.conf input { redis { host => "localhost" port => "6379" data_type => "list" key => "logstash" type => "redis-input" batch_count => 1 } } output { elasticsearch { hosts => "192.168.1.11:9200" } } 启动index.conf: nohup /usr/local/logstash/bin/logstash -f index.conf & 查看进程: ps -ef|grep java
查看Redis缓存:
redis-cli monitor 实时查看/监控redis有没有在接收日志