
数据库
PostgreSQL 18.6 安装记录
一、环境 项值主机192.168.6.98系统CentOS Stream 9(x86\64)SELinuxEnforcing防火墙firewalld(active)安装方式PGDG
PUT /_template/k8s-logs
{
"template": "k8s-logs*",
"settings": {
"number_of_shards": 10,
"number_of_replicas": 0
}
}
也可以使用
curl -XPUT localhost:9200/_template/k8s-logs -d
{
"template" : "k8s-logs-*",
"order":1,
"settings" : {
"number_of_shards" : 10,
"number_of_replicas": 0
},
"mappings" : {
"type1" : {
"_source" : {"enabled" : false }
}
}
}
我这里模版的mapping是从日志中学习到的,所以在模版中不需要定义,生成的日志会自动生成mappings。所有生成的日志都会在ElasticSearch中产生一个k8s-logs-%{+YYYY.MM.dd}格式的文件,就是当天的日志内容。
评论 0