文章分类 -  数据持久化

比如mongodb redis mysql等
摘要:ELK实用知识点总结 1 编码转换问题 这个问题,主要就是中文乱码。 input中的codec=>plain转码: codec => plain { charset => "GB2312" } 将GB2312的文本编码,转为UTF-8的编码。 也可以在filebeat中实现编码的转换(推荐): fi 阅读全文
posted @ 2019-04-28 12:33 richardzgt 阅读(710) 评论(0) 推荐(0)
摘要:#!/bin/bash # @Author: richard # @Date: 2017-08-11 17:27:49 # @Last Modified by: richard # @Last Modified time: 2017-08-11 18:04:58 #保留近 N 天 KEEP_DAYS 阅读全文
posted @ 2018-09-21 10:14 richardzgt 阅读(4628) 评论(6) 推荐(1)
摘要:先看下我这边的环境: logstash agent 从虚拟机抽取日志后分发到 redis 和 kafka 集群 (部分日志),但是我们的产品环境和管理网是隔离的,只能通过管理机 iptables 转发到 kafka,logstash output 的配置: output { redis { host 阅读全文
posted @ 2017-11-08 14:20 richardzgt 阅读(1929) 评论(0) 推荐(0)
摘要:通过 es 的 api 接口查询日志,使用了 elasticsearch 和elasticsearch_dsl 模块,对于不想组装 json 的人 dsl 真是方便~~~ pip install elasticsearch pip install elasticsearch_dsl # -*- co 阅读全文
posted @ 2017-11-08 12:21 richardzgt 阅读(1603) 评论(0) 推荐(0)
摘要:通过 redis 的 cluster nodes 命令解析出当前的主从状态 redis-cli -c -p 7000 cluster nodes 运行: #!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: richard # @Date: 阅读全文
posted @ 2017-11-08 12:01 richardzgt 阅读(537) 评论(0) 推荐(0)