日志是从logstash传输给ES的,但是logstash配置中只能配置host和index,所以只能在es中进行配置 但是在es配置文件中配置,也就是新增如下参数的话会报错:node settings must not contain any index level settings index.number_of_shards: 1 index.number_of_replicas: 0 所以采用索引模板的方式进行设置 POST /_templates/index_patterns { "o
检查集群健康状态,可以看集群颜色.(黄色:primary shard都正常,replica不正常) GET /_cat/health?v 列出集群所有index GET /_cat/indices?v GET _cluster/health PUT一条数据:如果指定文档不存在则创建,存在则全量替换.如果索引类型不存在,则自动创建索引.类型 PUT /beauties/cn/1 { "Name":"Zhao Liying", "Age":20, &
现象:lostack启动正常,logstack收集输入redis数据,输出到elasticsearch写入失败 提示:去建索引 的时候elasticsearch返回404 [2019-11-12T11:37:29,009][WARN ][logstash.outputs.elasticsearch][main] Could not index event to Elasticsearch. {:status=>404, :action=>["index", {:_id=&g