7.17.18
This commit is contained in:
commit
4abd228a1a
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/data/*
|
||||||
|
!.gitignore
|
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# docker启动的elasticsearch-ik服务
|
||||||
|
|
||||||
|
## 介绍
|
||||||
|
|
||||||
|
整合`elasticsearch`和`analysis-ik`的一键启动容器,选用版本`7.17.18`。
|
||||||
|
|
||||||
|
## 用法
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker compose up -d
|
||||||
|
```
|
13
config/analysis-ik/IKAnalyzer.cfg.xml
Normal file
13
config/analysis-ik/IKAnalyzer.cfg.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
|
||||||
|
<properties>
|
||||||
|
<comment>IK Analyzer 扩展配置</comment>
|
||||||
|
<!--用户可以在这里配置自己的扩展字典 -->
|
||||||
|
<entry key="ext_dict"></entry>
|
||||||
|
<!--用户可以在这里配置自己的扩展停止词字典-->
|
||||||
|
<entry key="ext_stopwords"></entry>
|
||||||
|
<!--用户可以在这里配置远程扩展字典 -->
|
||||||
|
<!-- <entry key="remote_ext_dict">words_location</entry> -->
|
||||||
|
<!--用户可以在这里配置远程扩展停止词字典-->
|
||||||
|
<!-- <entry key="remote_ext_stopwords">words_location</entry> -->
|
||||||
|
</properties>
|
398716
config/analysis-ik/extra_main.dic
Normal file
398716
config/analysis-ik/extra_main.dic
Normal file
File diff suppressed because it is too large
Load Diff
12638
config/analysis-ik/extra_single_word.dic
Normal file
12638
config/analysis-ik/extra_single_word.dic
Normal file
File diff suppressed because it is too large
Load Diff
12638
config/analysis-ik/extra_single_word_full.dic
Normal file
12638
config/analysis-ik/extra_single_word_full.dic
Normal file
File diff suppressed because it is too large
Load Diff
2714
config/analysis-ik/extra_single_word_low_freq.dic
Normal file
2714
config/analysis-ik/extra_single_word_low_freq.dic
Normal file
File diff suppressed because it is too large
Load Diff
31
config/analysis-ik/extra_stopword.dic
Normal file
31
config/analysis-ik/extra_stopword.dic
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
也
|
||||||
|
了
|
||||||
|
仍
|
||||||
|
从
|
||||||
|
以
|
||||||
|
使
|
||||||
|
则
|
||||||
|
却
|
||||||
|
又
|
||||||
|
及
|
||||||
|
对
|
||||||
|
就
|
||||||
|
并
|
||||||
|
很
|
||||||
|
或
|
||||||
|
把
|
||||||
|
是
|
||||||
|
的
|
||||||
|
着
|
||||||
|
给
|
||||||
|
而
|
||||||
|
被
|
||||||
|
让
|
||||||
|
在
|
||||||
|
还
|
||||||
|
比
|
||||||
|
等
|
||||||
|
当
|
||||||
|
与
|
||||||
|
于
|
||||||
|
但
|
275909
config/analysis-ik/main.dic
Normal file
275909
config/analysis-ik/main.dic
Normal file
File diff suppressed because it is too large
Load Diff
25
config/analysis-ik/preposition.dic
Normal file
25
config/analysis-ik/preposition.dic
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
不
|
||||||
|
也
|
||||||
|
了
|
||||||
|
仍
|
||||||
|
从
|
||||||
|
以
|
||||||
|
使
|
||||||
|
则
|
||||||
|
却
|
||||||
|
又
|
||||||
|
及
|
||||||
|
对
|
||||||
|
就
|
||||||
|
并
|
||||||
|
很
|
||||||
|
或
|
||||||
|
把
|
||||||
|
是
|
||||||
|
的
|
||||||
|
着
|
||||||
|
给
|
||||||
|
而
|
||||||
|
被
|
||||||
|
让
|
||||||
|
但
|
316
config/analysis-ik/quantifier.dic
Normal file
316
config/analysis-ik/quantifier.dic
Normal file
@ -0,0 +1,316 @@
|
|||||||
|
丈
|
||||||
|
下
|
||||||
|
世
|
||||||
|
世纪
|
||||||
|
两
|
||||||
|
个
|
||||||
|
中
|
||||||
|
串
|
||||||
|
亩
|
||||||
|
人
|
||||||
|
介
|
||||||
|
付
|
||||||
|
代
|
||||||
|
件
|
||||||
|
任
|
||||||
|
份
|
||||||
|
伏
|
||||||
|
伙
|
||||||
|
位
|
||||||
|
位数
|
||||||
|
例
|
||||||
|
倍
|
||||||
|
像素
|
||||||
|
元
|
||||||
|
克
|
||||||
|
克拉
|
||||||
|
公亩
|
||||||
|
公克
|
||||||
|
公分
|
||||||
|
公升
|
||||||
|
公尺
|
||||||
|
公担
|
||||||
|
公斤
|
||||||
|
公里
|
||||||
|
公顷
|
||||||
|
具
|
||||||
|
册
|
||||||
|
出
|
||||||
|
刀
|
||||||
|
分
|
||||||
|
分钟
|
||||||
|
分米
|
||||||
|
划
|
||||||
|
列
|
||||||
|
则
|
||||||
|
刻
|
||||||
|
剂
|
||||||
|
剑
|
||||||
|
副
|
||||||
|
加仑
|
||||||
|
勺
|
||||||
|
包
|
||||||
|
匙
|
||||||
|
匹
|
||||||
|
区
|
||||||
|
千克
|
||||||
|
千米
|
||||||
|
升
|
||||||
|
卷
|
||||||
|
厅
|
||||||
|
厘
|
||||||
|
厘米
|
||||||
|
双
|
||||||
|
发
|
||||||
|
口
|
||||||
|
句
|
||||||
|
只
|
||||||
|
台
|
||||||
|
叶
|
||||||
|
号
|
||||||
|
名
|
||||||
|
吨
|
||||||
|
听
|
||||||
|
员
|
||||||
|
周
|
||||||
|
周年
|
||||||
|
品
|
||||||
|
回
|
||||||
|
团
|
||||||
|
圆
|
||||||
|
圈
|
||||||
|
地
|
||||||
|
场
|
||||||
|
块
|
||||||
|
坪
|
||||||
|
堆
|
||||||
|
声
|
||||||
|
壶
|
||||||
|
处
|
||||||
|
夜
|
||||||
|
大
|
||||||
|
天
|
||||||
|
头
|
||||||
|
套
|
||||||
|
女
|
||||||
|
孔
|
||||||
|
字
|
||||||
|
宗
|
||||||
|
室
|
||||||
|
家
|
||||||
|
寸
|
||||||
|
对
|
||||||
|
封
|
||||||
|
尊
|
||||||
|
小时
|
||||||
|
尺
|
||||||
|
尾
|
||||||
|
局
|
||||||
|
层
|
||||||
|
届
|
||||||
|
岁
|
||||||
|
师
|
||||||
|
帧
|
||||||
|
幅
|
||||||
|
幕
|
||||||
|
幢
|
||||||
|
平方
|
||||||
|
平方公尺
|
||||||
|
平方公里
|
||||||
|
平方分米
|
||||||
|
平方厘米
|
||||||
|
平方码
|
||||||
|
平方米
|
||||||
|
平方英寸
|
||||||
|
平方英尺
|
||||||
|
平方英里
|
||||||
|
平米
|
||||||
|
年
|
||||||
|
年代
|
||||||
|
年级
|
||||||
|
度
|
||||||
|
座
|
||||||
|
式
|
||||||
|
引
|
||||||
|
张
|
||||||
|
成
|
||||||
|
战
|
||||||
|
截
|
||||||
|
户
|
||||||
|
房
|
||||||
|
所
|
||||||
|
扇
|
||||||
|
手
|
||||||
|
打
|
||||||
|
批
|
||||||
|
把
|
||||||
|
折
|
||||||
|
担
|
||||||
|
拍
|
||||||
|
招
|
||||||
|
拨
|
||||||
|
拳
|
||||||
|
指
|
||||||
|
掌
|
||||||
|
排
|
||||||
|
撮
|
||||||
|
支
|
||||||
|
文
|
||||||
|
斗
|
||||||
|
斤
|
||||||
|
方
|
||||||
|
族
|
||||||
|
日
|
||||||
|
时
|
||||||
|
曲
|
||||||
|
月
|
||||||
|
月份
|
||||||
|
期
|
||||||
|
本
|
||||||
|
朵
|
||||||
|
村
|
||||||
|
束
|
||||||
|
条
|
||||||
|
来
|
||||||
|
杯
|
||||||
|
枚
|
||||||
|
枝
|
||||||
|
枪
|
||||||
|
架
|
||||||
|
柄
|
||||||
|
柜
|
||||||
|
栋
|
||||||
|
栏
|
||||||
|
株
|
||||||
|
样
|
||||||
|
根
|
||||||
|
格
|
||||||
|
案
|
||||||
|
桌
|
||||||
|
档
|
||||||
|
桩
|
||||||
|
桶
|
||||||
|
梯
|
||||||
|
棵
|
||||||
|
楼
|
||||||
|
次
|
||||||
|
款
|
||||||
|
步
|
||||||
|
段
|
||||||
|
毛
|
||||||
|
毫
|
||||||
|
毫升
|
||||||
|
毫米
|
||||||
|
毫克
|
||||||
|
池
|
||||||
|
洲
|
||||||
|
派
|
||||||
|
海里
|
||||||
|
滴
|
||||||
|
炮
|
||||||
|
点
|
||||||
|
点钟
|
||||||
|
片
|
||||||
|
版
|
||||||
|
环
|
||||||
|
班
|
||||||
|
瓣
|
||||||
|
瓶
|
||||||
|
生
|
||||||
|
男
|
||||||
|
画
|
||||||
|
界
|
||||||
|
盆
|
||||||
|
盎司
|
||||||
|
盏
|
||||||
|
盒
|
||||||
|
盘
|
||||||
|
相
|
||||||
|
眼
|
||||||
|
石
|
||||||
|
码
|
||||||
|
碗
|
||||||
|
碟
|
||||||
|
磅
|
||||||
|
种
|
||||||
|
科
|
||||||
|
秒
|
||||||
|
秒钟
|
||||||
|
窝
|
||||||
|
立方公尺
|
||||||
|
立方分米
|
||||||
|
立方厘米
|
||||||
|
立方码
|
||||||
|
立方米
|
||||||
|
立方英寸
|
||||||
|
立方英尺
|
||||||
|
站
|
||||||
|
章
|
||||||
|
笔
|
||||||
|
等
|
||||||
|
筐
|
||||||
|
筒
|
||||||
|
箱
|
||||||
|
篇
|
||||||
|
篓
|
||||||
|
篮
|
||||||
|
簇
|
||||||
|
米
|
||||||
|
类
|
||||||
|
粒
|
||||||
|
级
|
||||||
|
组
|
||||||
|
维
|
||||||
|
缕
|
||||||
|
缸
|
||||||
|
罐
|
||||||
|
网
|
||||||
|
群
|
||||||
|
股
|
||||||
|
脚
|
||||||
|
船
|
||||||
|
艇
|
||||||
|
艘
|
||||||
|
色
|
||||||
|
节
|
||||||
|
英亩
|
||||||
|
英寸
|
||||||
|
英尺
|
||||||
|
英里
|
||||||
|
行
|
||||||
|
袋
|
||||||
|
角
|
||||||
|
言
|
||||||
|
课
|
||||||
|
起
|
||||||
|
趟
|
||||||
|
路
|
||||||
|
车
|
||||||
|
转
|
||||||
|
轮
|
||||||
|
辆
|
||||||
|
辈
|
||||||
|
连
|
||||||
|
通
|
||||||
|
遍
|
||||||
|
部
|
||||||
|
里
|
||||||
|
重
|
||||||
|
针
|
||||||
|
钟
|
||||||
|
钱
|
||||||
|
锅
|
||||||
|
门
|
||||||
|
间
|
||||||
|
队
|
||||||
|
阶段
|
||||||
|
隅
|
||||||
|
集
|
||||||
|
页
|
||||||
|
顶
|
||||||
|
顷
|
||||||
|
项
|
||||||
|
顿
|
||||||
|
颗
|
||||||
|
餐
|
||||||
|
首
|
33
config/analysis-ik/stopword.dic
Normal file
33
config/analysis-ik/stopword.dic
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
a
|
||||||
|
an
|
||||||
|
and
|
||||||
|
are
|
||||||
|
as
|
||||||
|
at
|
||||||
|
be
|
||||||
|
but
|
||||||
|
by
|
||||||
|
for
|
||||||
|
if
|
||||||
|
in
|
||||||
|
into
|
||||||
|
is
|
||||||
|
it
|
||||||
|
no
|
||||||
|
not
|
||||||
|
of
|
||||||
|
on
|
||||||
|
or
|
||||||
|
such
|
||||||
|
that
|
||||||
|
the
|
||||||
|
their
|
||||||
|
then
|
||||||
|
there
|
||||||
|
these
|
||||||
|
they
|
||||||
|
this
|
||||||
|
to
|
||||||
|
was
|
||||||
|
will
|
||||||
|
with
|
37
config/analysis-ik/suffix.dic
Normal file
37
config/analysis-ik/suffix.dic
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
乡
|
||||||
|
井
|
||||||
|
亭
|
||||||
|
党
|
||||||
|
区
|
||||||
|
厅
|
||||||
|
县
|
||||||
|
园
|
||||||
|
塔
|
||||||
|
家
|
||||||
|
寺
|
||||||
|
局
|
||||||
|
巷
|
||||||
|
市
|
||||||
|
弄
|
||||||
|
所
|
||||||
|
斯基
|
||||||
|
楼
|
||||||
|
江
|
||||||
|
河
|
||||||
|
海
|
||||||
|
湖
|
||||||
|
省
|
||||||
|
维奇
|
||||||
|
署
|
||||||
|
苑
|
||||||
|
街
|
||||||
|
觀
|
||||||
|
观
|
||||||
|
诺夫
|
||||||
|
路
|
||||||
|
部
|
||||||
|
镇
|
||||||
|
阁
|
||||||
|
山
|
||||||
|
子
|
||||||
|
娃
|
131
config/analysis-ik/surname.dic
Normal file
131
config/analysis-ik/surname.dic
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
丁
|
||||||
|
万
|
||||||
|
万俟
|
||||||
|
上官
|
||||||
|
东方
|
||||||
|
乔
|
||||||
|
于
|
||||||
|
令狐
|
||||||
|
仲孙
|
||||||
|
任
|
||||||
|
何
|
||||||
|
余
|
||||||
|
候
|
||||||
|
傅
|
||||||
|
公冶
|
||||||
|
公孙
|
||||||
|
公羊
|
||||||
|
冯
|
||||||
|
刘
|
||||||
|
单
|
||||||
|
单于
|
||||||
|
卢
|
||||||
|
史
|
||||||
|
叶
|
||||||
|
司徒
|
||||||
|
司空
|
||||||
|
司马
|
||||||
|
吕
|
||||||
|
吴
|
||||||
|
周
|
||||||
|
唐
|
||||||
|
夏
|
||||||
|
夏侯
|
||||||
|
太叔
|
||||||
|
姚
|
||||||
|
姜
|
||||||
|
孔
|
||||||
|
孙
|
||||||
|
孟
|
||||||
|
宇文
|
||||||
|
宋
|
||||||
|
宗政
|
||||||
|
尉迟
|
||||||
|
尹
|
||||||
|
崔
|
||||||
|
常
|
||||||
|
康
|
||||||
|
廖
|
||||||
|
张
|
||||||
|
彭
|
||||||
|
徐
|
||||||
|
慕容
|
||||||
|
戴
|
||||||
|
文
|
||||||
|
方
|
||||||
|
易
|
||||||
|
曹
|
||||||
|
曾
|
||||||
|
朱
|
||||||
|
李
|
||||||
|
杜
|
||||||
|
杨
|
||||||
|
林
|
||||||
|
梁
|
||||||
|
欧阳
|
||||||
|
武
|
||||||
|
段
|
||||||
|
毛
|
||||||
|
江
|
||||||
|
汤
|
||||||
|
沈
|
||||||
|
淳于
|
||||||
|
潘
|
||||||
|
澹台
|
||||||
|
濮阳
|
||||||
|
熊
|
||||||
|
王
|
||||||
|
田
|
||||||
|
申屠
|
||||||
|
白
|
||||||
|
皇甫
|
||||||
|
石
|
||||||
|
秦
|
||||||
|
程
|
||||||
|
罗
|
||||||
|
肖
|
||||||
|
胡
|
||||||
|
苏
|
||||||
|
范
|
||||||
|
董
|
||||||
|
蒋
|
||||||
|
薛
|
||||||
|
袁
|
||||||
|
许
|
||||||
|
诸葛
|
||||||
|
谢
|
||||||
|
谭
|
||||||
|
贺
|
||||||
|
贾
|
||||||
|
赖
|
||||||
|
赫连
|
||||||
|
赵
|
||||||
|
轩辕
|
||||||
|
邓
|
||||||
|
邱
|
||||||
|
邵
|
||||||
|
邹
|
||||||
|
郑
|
||||||
|
郝
|
||||||
|
郭
|
||||||
|
金
|
||||||
|
钟
|
||||||
|
钟离
|
||||||
|
钱
|
||||||
|
长孙
|
||||||
|
闻人
|
||||||
|
闾丘
|
||||||
|
阎
|
||||||
|
陆
|
||||||
|
陈
|
||||||
|
雷
|
||||||
|
韩
|
||||||
|
顾
|
||||||
|
马
|
||||||
|
高
|
||||||
|
魏
|
||||||
|
鲜于
|
||||||
|
黄
|
||||||
|
黎
|
||||||
|
龙
|
||||||
|
龚
|
27
config/elasticsearch-plugins.example.yml
Normal file
27
config/elasticsearch-plugins.example.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Rename this file to `elasticsearch-plugins.yml` to use it.
|
||||||
|
#
|
||||||
|
# All plugins must be listed here. If you add a plugin to this list and run
|
||||||
|
# `elasticsearch-plugin sync`, that plugin will be installed. If you remove
|
||||||
|
# a plugin from this list, that plugin will be removed when Elasticsearch
|
||||||
|
# next starts.
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
# Each plugin must have an ID. Plugins with only an ID are official plugins and will be downloaded from Elastic.
|
||||||
|
- id: example-id
|
||||||
|
|
||||||
|
# Plugins can be specified by URL (it doesn't have to be HTTP, you could use e.g. `file:`)
|
||||||
|
- id: example-with-url
|
||||||
|
location: https://some.domain/path/example4.zip
|
||||||
|
|
||||||
|
# Or by maven coordinates:
|
||||||
|
- id: example-with-maven-url
|
||||||
|
location: org.elasticsearch.plugins:example-plugin:1.2.3
|
||||||
|
|
||||||
|
# A proxy can also be configured per-plugin, if necessary
|
||||||
|
- id: example-with-proxy
|
||||||
|
location: https://some.domain/path/example.zip
|
||||||
|
proxy: https://some.domain:1234
|
||||||
|
|
||||||
|
# Configures a proxy for all network access. Remove this if you don't need
|
||||||
|
# to use a proxy.
|
||||||
|
proxy: https://some.domain:1234
|
BIN
config/elasticsearch.keystore
Normal file
BIN
config/elasticsearch.keystore
Normal file
Binary file not shown.
2
config/elasticsearch.yml
Normal file
2
config/elasticsearch.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
cluster.name: "docker-cluster"
|
||||||
|
network.host: 0.0.0.0
|
96
config/jvm.options
Normal file
96
config/jvm.options
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
################################################################
|
||||||
|
##
|
||||||
|
## JVM configuration
|
||||||
|
##
|
||||||
|
################################################################
|
||||||
|
##
|
||||||
|
## WARNING: DO NOT EDIT THIS FILE. If you want to override the
|
||||||
|
## JVM options in this file, or set any additional options, you
|
||||||
|
## should create one or more files in the jvm.options.d
|
||||||
|
## directory containing your adjustments.
|
||||||
|
##
|
||||||
|
## See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/jvm-options.html
|
||||||
|
## for more information.
|
||||||
|
##
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
## IMPORTANT: JVM heap size
|
||||||
|
################################################################
|
||||||
|
##
|
||||||
|
## The heap size is automatically configured by Elasticsearch
|
||||||
|
## based on the available memory in your system and the roles
|
||||||
|
## each node is configured to fulfill. If specifying heap is
|
||||||
|
## required, it should be done through a file in jvm.options.d,
|
||||||
|
## and the min and max should be set to the same value. For
|
||||||
|
## example, to set the heap to 4 GB, create a new file in the
|
||||||
|
## jvm.options.d directory containing these lines:
|
||||||
|
##
|
||||||
|
## -Xms4g
|
||||||
|
## -Xmx4g
|
||||||
|
##
|
||||||
|
## See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/heap-size.html
|
||||||
|
## for more information
|
||||||
|
##
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
## Expert settings
|
||||||
|
################################################################
|
||||||
|
##
|
||||||
|
## All settings below here are considered expert settings. Do
|
||||||
|
## not adjust them unless you understand what you are doing. Do
|
||||||
|
## not edit them in this file; instead, create a new file in the
|
||||||
|
## jvm.options.d directory containing your adjustments.
|
||||||
|
##
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
## GC configuration
|
||||||
|
8-13:-XX:+UseConcMarkSweepGC
|
||||||
|
8-13:-XX:CMSInitiatingOccupancyFraction=75
|
||||||
|
8-13:-XX:+UseCMSInitiatingOccupancyOnly
|
||||||
|
|
||||||
|
## G1GC Configuration
|
||||||
|
# NOTE: G1 GC is only supported on JDK version 10 or later
|
||||||
|
# to use G1GC, uncomment the next two lines and update the version on the
|
||||||
|
# following three lines to your version of the JDK
|
||||||
|
# 10-13:-XX:-UseConcMarkSweepGC
|
||||||
|
# 10-13:-XX:-UseCMSInitiatingOccupancyOnly
|
||||||
|
14-:-XX:+UseG1GC
|
||||||
|
|
||||||
|
## JVM temporary directory
|
||||||
|
-Djava.io.tmpdir=${ES_TMPDIR}
|
||||||
|
|
||||||
|
## heap dumps
|
||||||
|
|
||||||
|
# generate a heap dump when an allocation from the Java heap fails; heap dumps
|
||||||
|
# are created in the working directory of the JVM unless an alternative path is
|
||||||
|
# specified
|
||||||
|
-XX:+HeapDumpOnOutOfMemoryError
|
||||||
|
|
||||||
|
# exit right after heap dump on out of memory error. Recommended to also use
|
||||||
|
# on java 8 for supported versions (8u92+).
|
||||||
|
9-:-XX:+ExitOnOutOfMemoryError
|
||||||
|
|
||||||
|
# specify an alternative path for heap dumps; ensure the directory exists and
|
||||||
|
# has sufficient space
|
||||||
|
-XX:HeapDumpPath=data
|
||||||
|
|
||||||
|
# specify an alternative path for JVM fatal error logs
|
||||||
|
-XX:ErrorFile=logs/hs_err_pid%p.log
|
||||||
|
|
||||||
|
## JDK 8 GC logging
|
||||||
|
8:-XX:+PrintGCDetails
|
||||||
|
8:-XX:+PrintGCDateStamps
|
||||||
|
8:-XX:+PrintTenuringDistribution
|
||||||
|
8:-XX:+PrintGCApplicationStoppedTime
|
||||||
|
8:-Xloggc:logs/gc.log
|
||||||
|
8:-XX:+UseGCLogFileRotation
|
||||||
|
8:-XX:NumberOfGCLogFiles=32
|
||||||
|
8:-XX:GCLogFileSize=64m
|
||||||
|
|
||||||
|
# JDK 9+ GC logging
|
||||||
|
9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
|
282
config/log4j2.file.properties
Normal file
282
config/log4j2.file.properties
Normal file
@ -0,0 +1,282 @@
|
|||||||
|
status = error
|
||||||
|
|
||||||
|
appender.console.type = Console
|
||||||
|
appender.console.name = console
|
||||||
|
appender.console.layout.type = PatternLayout
|
||||||
|
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
|
||||||
|
|
||||||
|
######## Server JSON ############################
|
||||||
|
appender.rolling.type = RollingFile
|
||||||
|
appender.rolling.name = rolling
|
||||||
|
appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_server.json
|
||||||
|
appender.rolling.layout.type = ESJsonLayout
|
||||||
|
appender.rolling.layout.type_name = server
|
||||||
|
|
||||||
|
appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}-%i.json.gz
|
||||||
|
appender.rolling.policies.type = Policies
|
||||||
|
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
|
||||||
|
appender.rolling.policies.time.interval = 1
|
||||||
|
appender.rolling.policies.time.modulate = true
|
||||||
|
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
|
||||||
|
appender.rolling.policies.size.size = 128MB
|
||||||
|
appender.rolling.strategy.type = DefaultRolloverStrategy
|
||||||
|
appender.rolling.strategy.fileIndex = nomax
|
||||||
|
appender.rolling.strategy.action.type = Delete
|
||||||
|
appender.rolling.strategy.action.basepath = ${sys:es.logs.base_path}
|
||||||
|
appender.rolling.strategy.action.condition.type = IfFileName
|
||||||
|
appender.rolling.strategy.action.condition.glob = ${sys:es.logs.cluster_name}-*
|
||||||
|
appender.rolling.strategy.action.condition.nested_condition.type = IfAccumulatedFileSize
|
||||||
|
appender.rolling.strategy.action.condition.nested_condition.exceeds = 2GB
|
||||||
|
################################################
|
||||||
|
######## Server - old style pattern ###########
|
||||||
|
appender.rolling_old.type = RollingFile
|
||||||
|
appender.rolling_old.name = rolling_old
|
||||||
|
appender.rolling_old.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log
|
||||||
|
appender.rolling_old.layout.type = PatternLayout
|
||||||
|
appender.rolling_old.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
|
||||||
|
|
||||||
|
appender.rolling_old.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}-%i.log.gz
|
||||||
|
appender.rolling_old.policies.type = Policies
|
||||||
|
appender.rolling_old.policies.time.type = TimeBasedTriggeringPolicy
|
||||||
|
appender.rolling_old.policies.time.interval = 1
|
||||||
|
appender.rolling_old.policies.time.modulate = true
|
||||||
|
appender.rolling_old.policies.size.type = SizeBasedTriggeringPolicy
|
||||||
|
appender.rolling_old.policies.size.size = 128MB
|
||||||
|
appender.rolling_old.strategy.type = DefaultRolloverStrategy
|
||||||
|
appender.rolling_old.strategy.fileIndex = nomax
|
||||||
|
appender.rolling_old.strategy.action.type = Delete
|
||||||
|
appender.rolling_old.strategy.action.basepath = ${sys:es.logs.base_path}
|
||||||
|
appender.rolling_old.strategy.action.condition.type = IfFileName
|
||||||
|
appender.rolling_old.strategy.action.condition.glob = ${sys:es.logs.cluster_name}-*
|
||||||
|
appender.rolling_old.strategy.action.condition.nested_condition.type = IfAccumulatedFileSize
|
||||||
|
appender.rolling_old.strategy.action.condition.nested_condition.exceeds = 2GB
|
||||||
|
################################################
|
||||||
|
|
||||||
|
rootLogger.level = info
|
||||||
|
rootLogger.appenderRef.console.ref = console
|
||||||
|
rootLogger.appenderRef.rolling.ref = rolling
|
||||||
|
rootLogger.appenderRef.rolling_old.ref = rolling_old
|
||||||
|
|
||||||
|
######## Deprecation JSON #######################
|
||||||
|
appender.deprecation_rolling.type = RollingFile
|
||||||
|
appender.deprecation_rolling.name = deprecation_rolling
|
||||||
|
appender.deprecation_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation.json
|
||||||
|
appender.deprecation_rolling.layout.type = ESJsonLayout
|
||||||
|
appender.deprecation_rolling.layout.type_name = deprecation.elasticsearch
|
||||||
|
appender.deprecation_rolling.layout.esmessagefields=x-opaque-id,key,category,elasticsearch.elastic_product_origin
|
||||||
|
appender.deprecation_rolling.filter.rate_limit.type = RateLimitingFilter
|
||||||
|
|
||||||
|
appender.deprecation_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation-%i.json.gz
|
||||||
|
appender.deprecation_rolling.policies.type = Policies
|
||||||
|
appender.deprecation_rolling.policies.size.type = SizeBasedTriggeringPolicy
|
||||||
|
appender.deprecation_rolling.policies.size.size = 1GB
|
||||||
|
appender.deprecation_rolling.strategy.type = DefaultRolloverStrategy
|
||||||
|
appender.deprecation_rolling.strategy.max = 4
|
||||||
|
|
||||||
|
appender.header_warning.type = HeaderWarningAppender
|
||||||
|
appender.header_warning.name = header_warning
|
||||||
|
#################################################
|
||||||
|
######## Deprecation - old style pattern #######
|
||||||
|
appender.deprecation_rolling_old.type = RollingFile
|
||||||
|
appender.deprecation_rolling_old.name = deprecation_rolling_old
|
||||||
|
appender.deprecation_rolling_old.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_deprecation.log
|
||||||
|
appender.deprecation_rolling_old.layout.type = PatternLayout
|
||||||
|
appender.deprecation_rolling_old.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name] [%product_origin]%marker %m%n
|
||||||
|
appender.deprecation_rolling_old.filter.rate_limit.type = RateLimitingFilter
|
||||||
|
|
||||||
|
appender.deprecation_rolling_old.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
|
||||||
|
_deprecation-%i.log.gz
|
||||||
|
appender.deprecation_rolling_old.policies.type = Policies
|
||||||
|
appender.deprecation_rolling_old.policies.size.type = SizeBasedTriggeringPolicy
|
||||||
|
appender.deprecation_rolling_old.policies.size.size = 1GB
|
||||||
|
appender.deprecation_rolling_old.strategy.type = DefaultRolloverStrategy
|
||||||
|
appender.deprecation_rolling_old.strategy.max = 4
|
||||||
|
#################################################
|
||||||
|
logger.deprecation.name = org.elasticsearch.deprecation
|
||||||
|
logger.deprecation.level = WARN
|
||||||
|
logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_rolling
|
||||||
|
logger.deprecation.appenderRef.deprecation_rolling_old.ref = deprecation_rolling_old
|
||||||
|
logger.deprecation.appenderRef.header_warning.ref = header_warning
|
||||||
|
logger.deprecation.additivity = false
|
||||||
|
|
||||||
|
######## Search slowlog JSON ####################
|
||||||
|
appender.index_search_slowlog_rolling.type = RollingFile
|
||||||
|
appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
|
||||||
|
appender.index_search_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs\
|
||||||
|
.cluster_name}_index_search_slowlog.json
|
||||||
|
appender.index_search_slowlog_rolling.layout.type = ESJsonLayout
|
||||||
|
appender.index_search_slowlog_rolling.layout.type_name = index_search_slowlog
|
||||||
|
appender.index_search_slowlog_rolling.layout.esmessagefields=message,took,took_millis,total_hits,types,stats,search_type,total_shards,source,id
|
||||||
|
|
||||||
|
appender.index_search_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs\
|
||||||
|
.cluster_name}_index_search_slowlog-%i.json.gz
|
||||||
|
appender.index_search_slowlog_rolling.policies.type = Policies
|
||||||
|
appender.index_search_slowlog_rolling.policies.size.type = SizeBasedTriggeringPolicy
|
||||||
|
appender.index_search_slowlog_rolling.policies.size.size = 1GB
|
||||||
|
appender.index_search_slowlog_rolling.strategy.type = DefaultRolloverStrategy
|
||||||
|
appender.index_search_slowlog_rolling.strategy.max = 4
|
||||||
|
#################################################
|
||||||
|
######## Search slowlog - old style pattern ####
|
||||||
|
appender.index_search_slowlog_rolling_old.type = RollingFile
|
||||||
|
appender.index_search_slowlog_rolling_old.name = index_search_slowlog_rolling_old
|
||||||
|
appender.index_search_slowlog_rolling_old.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
|
||||||
|
_index_search_slowlog.log
|
||||||
|
appender.index_search_slowlog_rolling_old.layout.type = PatternLayout
|
||||||
|
appender.index_search_slowlog_rolling_old.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
|
||||||
|
|
||||||
|
appender.index_search_slowlog_rolling_old.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
|
||||||
|
_index_search_slowlog-%i.log.gz
|
||||||
|
appender.index_search_slowlog_rolling_old.policies.type = Policies
|
||||||
|
appender.index_search_slowlog_rolling_old.policies.size.type = SizeBasedTriggeringPolicy
|
||||||
|
appender.index_search_slowlog_rolling_old.policies.size.size = 1GB
|
||||||
|
appender.index_search_slowlog_rolling_old.strategy.type = DefaultRolloverStrategy
|
||||||
|
appender.index_search_slowlog_rolling_old.strategy.max = 4
|
||||||
|
#################################################
|
||||||
|
logger.index_search_slowlog_rolling.name = index.search.slowlog
|
||||||
|
logger.index_search_slowlog_rolling.level = trace
|
||||||
|
logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = index_search_slowlog_rolling
|
||||||
|
logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling_old.ref = index_search_slowlog_rolling_old
|
||||||
|
logger.index_search_slowlog_rolling.additivity = false
|
||||||
|
|
||||||
|
######## Indexing slowlog JSON ##################
|
||||||
|
appender.index_indexing_slowlog_rolling.type = RollingFile
|
||||||
|
appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
|
||||||
|
appender.index_indexing_slowlog_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
|
||||||
|
_index_indexing_slowlog.json
|
||||||
|
appender.index_indexing_slowlog_rolling.layout.type = ESJsonLayout
|
||||||
|
appender.index_indexing_slowlog_rolling.layout.type_name = index_indexing_slowlog
|
||||||
|
appender.index_indexing_slowlog_rolling.layout.esmessagefields=message,took,took_millis,doc_type,id,routing,source
|
||||||
|
|
||||||
|
appender.index_indexing_slowlog_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
|
||||||
|
_index_indexing_slowlog-%i.json.gz
|
||||||
|
appender.index_indexing_slowlog_rolling.policies.type = Policies
|
||||||
|
appender.index_indexing_slowlog_rolling.policies.size.type = SizeBasedTriggeringPolicy
|
||||||
|
appender.index_indexing_slowlog_rolling.policies.size.size = 1GB
|
||||||
|
appender.index_indexing_slowlog_rolling.strategy.type = DefaultRolloverStrategy
|
||||||
|
appender.index_indexing_slowlog_rolling.strategy.max = 4
|
||||||
|
#################################################
|
||||||
|
######## Indexing slowlog - old style pattern ##
|
||||||
|
appender.index_indexing_slowlog_rolling_old.type = RollingFile
|
||||||
|
appender.index_indexing_slowlog_rolling_old.name = index_indexing_slowlog_rolling_old
|
||||||
|
appender.index_indexing_slowlog_rolling_old.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
|
||||||
|
_index_indexing_slowlog.log
|
||||||
|
appender.index_indexing_slowlog_rolling_old.layout.type = PatternLayout
|
||||||
|
appender.index_indexing_slowlog_rolling_old.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n
|
||||||
|
|
||||||
|
appender.index_indexing_slowlog_rolling_old.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}\
|
||||||
|
_index_indexing_slowlog-%i.log.gz
|
||||||
|
appender.index_indexing_slowlog_rolling_old.policies.type = Policies
|
||||||
|
appender.index_indexing_slowlog_rolling_old.policies.size.type = SizeBasedTriggeringPolicy
|
||||||
|
appender.index_indexing_slowlog_rolling_old.policies.size.size = 1GB
|
||||||
|
appender.index_indexing_slowlog_rolling_old.strategy.type = DefaultRolloverStrategy
|
||||||
|
appender.index_indexing_slowlog_rolling_old.strategy.max = 4
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
logger.index_indexing_slowlog.name = index.indexing.slowlog.index
|
||||||
|
logger.index_indexing_slowlog.level = trace
|
||||||
|
logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling.ref = index_indexing_slowlog_rolling
|
||||||
|
logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling_old.ref = index_indexing_slowlog_rolling_old
|
||||||
|
logger.index_indexing_slowlog.additivity = false
|
||||||
|
|
||||||
|
|
||||||
|
appender.audit_rolling.type = RollingFile
|
||||||
|
appender.audit_rolling.name = audit_rolling
|
||||||
|
appender.audit_rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_audit.json
|
||||||
|
appender.audit_rolling.layout.type = PatternLayout
|
||||||
|
appender.audit_rolling.layout.pattern = {\
|
||||||
|
"type":"audit", \
|
||||||
|
"timestamp":"%d{yyyy-MM-dd'T'HH:mm:ss,SSSZ}"\
|
||||||
|
%varsNotEmpty{, "node.name":"%enc{%map{node.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "node.id":"%enc{%map{node.id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "host.name":"%enc{%map{host.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "host.ip":"%enc{%map{host.ip}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "event.type":"%enc{%map{event.type}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "event.action":"%enc{%map{event.action}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "authentication.type":"%enc{%map{authentication.type}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.name":"%enc{%map{user.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.run_by.name":"%enc{%map{user.run_by.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.run_as.name":"%enc{%map{user.run_as.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.realm":"%enc{%map{user.realm}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.run_by.realm":"%enc{%map{user.run_by.realm}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.run_as.realm":"%enc{%map{user.run_as.realm}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.roles":%map{user.roles}}\
|
||||||
|
%varsNotEmpty{, "apikey.id":"%enc{%map{apikey.id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "apikey.name":"%enc{%map{apikey.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "authentication.token.name":"%enc{%map{authentication.token.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "authentication.token.type":"%enc{%map{authentication.token.type}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "origin.type":"%enc{%map{origin.type}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "origin.address":"%enc{%map{origin.address}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "realm":"%enc{%map{realm}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "url.path":"%enc{%map{url.path}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "url.query":"%enc{%map{url.query}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "request.method":"%enc{%map{request.method}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "request.body":"%enc{%map{request.body}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "request.id":"%enc{%map{request.id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "action":"%enc{%map{action}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "request.name":"%enc{%map{request.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "indices":%map{indices}}\
|
||||||
|
%varsNotEmpty{, "opaque_id":"%enc{%map{opaque_id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "trace.id":"%enc{%map{trace.id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "x_forwarded_for":"%enc{%map{x_forwarded_for}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "transport.profile":"%enc{%map{transport.profile}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "rule":"%enc{%map{rule}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "put":%map{put}}\
|
||||||
|
%varsNotEmpty{, "delete":%map{delete}}\
|
||||||
|
%varsNotEmpty{, "change":%map{change}}\
|
||||||
|
%varsNotEmpty{, "create":%map{create}}\
|
||||||
|
%varsNotEmpty{, "invalidate":%map{invalidate}}\
|
||||||
|
}%n
|
||||||
|
# "node.name" node name from the `elasticsearch.yml` settings
|
||||||
|
# "node.id" node id which should not change between cluster restarts
|
||||||
|
# "host.name" unresolved hostname of the local node
|
||||||
|
# "host.ip" the local bound ip (i.e. the ip listening for connections)
|
||||||
|
# "origin.type" a received REST request is translated into one or more transport requests. This indicates which processing layer generated the event "rest" or "transport" (internal)
|
||||||
|
# "event.action" the name of the audited event, eg. "authentication_failed", "access_granted", "run_as_granted", etc.
|
||||||
|
# "authentication.type" one of "realm", "api_key", "token", "anonymous" or "internal"
|
||||||
|
# "user.name" the subject name as authenticated by a realm
|
||||||
|
# "user.run_by.name" the original authenticated subject name that is impersonating another one.
|
||||||
|
# "user.run_as.name" if this "event.action" is of a run_as type, this is the subject name to be impersonated as.
|
||||||
|
# "user.realm" the name of the realm that authenticated "user.name"
|
||||||
|
# "user.run_by.realm" the realm name of the impersonating subject ("user.run_by.name")
|
||||||
|
# "user.run_as.realm" if this "event.action" is of a run_as type, this is the realm name the impersonated user is looked up from
|
||||||
|
# "user.roles" the roles array of the user; these are the roles that are granting privileges
|
||||||
|
# "apikey.id" this field is present if and only if the "authentication.type" is "api_key"
|
||||||
|
# "apikey.name" this field is present if and only if the "authentication.type" is "api_key"
|
||||||
|
# "authentication.token.name" this field is present if and only if the authenticating credential is a service account token
|
||||||
|
# "authentication.token.type" this field is present if and only if the authenticating credential is a service account token
|
||||||
|
# "event.type" informs about what internal system generated the event; possible values are "rest", "transport", "ip_filter" and "security_config_change"
|
||||||
|
# "origin.address" the remote address and port of the first network hop, i.e. a REST proxy or another cluster node
|
||||||
|
# "realm" name of a realm that has generated an "authentication_failed" or an "authentication_successful"; the subject is not yet authenticated
|
||||||
|
# "url.path" the URI component between the port and the query string; it is percent (URL) encoded
|
||||||
|
# "url.query" the URI component after the path and before the fragment; it is percent (URL) encoded
|
||||||
|
# "request.method" the method of the HTTP request, i.e. one of GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH, TRACE, CONNECT
|
||||||
|
# "request.body" the content of the request body entity, JSON escaped
|
||||||
|
# "request.id" a synthetic identifier for the incoming request, this is unique per incoming request, and consistent across all audit events generated by that request
|
||||||
|
# "action" an action is the most granular operation that is authorized and this identifies it in a namespaced way (internal)
|
||||||
|
# "request.name" if the event is in connection to a transport message this is the name of the request class, similar to how rest requests are identified by the url path (internal)
|
||||||
|
# "indices" the array of indices that the "action" is acting upon
|
||||||
|
# "opaque_id" opaque value conveyed by the "X-Opaque-Id" request header
|
||||||
|
# "trace_id" an identifier conveyed by the part of "traceparent" request header
|
||||||
|
# "x_forwarded_for" the addresses from the "X-Forwarded-For" request header, as a verbatim string value (not an array)
|
||||||
|
# "transport.profile" name of the transport profile in case this is a "connection_granted" or "connection_denied" event
|
||||||
|
# "rule" name of the applied rule if the "origin.type" is "ip_filter"
|
||||||
|
# the "put", "delete", "change", "create", "invalidate" fields are only present
|
||||||
|
# when the "event.type" is "security_config_change" and contain the security config change (as an object) taking effect
|
||||||
|
|
||||||
|
appender.audit_rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}_audit-%d{yyyy-MM-dd}.json
|
||||||
|
appender.audit_rolling.policies.type = Policies
|
||||||
|
appender.audit_rolling.policies.time.type = TimeBasedTriggeringPolicy
|
||||||
|
appender.audit_rolling.policies.time.interval = 1
|
||||||
|
appender.audit_rolling.policies.time.modulate = true
|
||||||
|
|
||||||
|
logger.xpack_security_audit_logfile.name = org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrail
|
||||||
|
logger.xpack_security_audit_logfile.level = info
|
||||||
|
logger.xpack_security_audit_logfile.appenderRef.audit_rolling.ref = audit_rolling
|
||||||
|
logger.xpack_security_audit_logfile.additivity = false
|
||||||
|
|
||||||
|
logger.xmlsig.name = org.apache.xml.security.signature.XMLSignature
|
||||||
|
logger.xmlsig.level = error
|
||||||
|
logger.samlxml_decrypt.name = org.opensaml.xmlsec.encryption.support.Decrypter
|
||||||
|
logger.samlxml_decrypt.level = fatal
|
||||||
|
logger.saml2_decrypt.name = org.opensaml.saml.saml2.encryption.Decrypter
|
||||||
|
logger.saml2_decrypt.level = fatal
|
159
config/log4j2.properties
Normal file
159
config/log4j2.properties
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
status = error
|
||||||
|
|
||||||
|
######## Server JSON ############################
|
||||||
|
appender.rolling.type = Console
|
||||||
|
appender.rolling.name = rolling
|
||||||
|
appender.rolling.layout.type = ESJsonLayout
|
||||||
|
appender.rolling.layout.type_name = server
|
||||||
|
|
||||||
|
################################################
|
||||||
|
|
||||||
|
################################################
|
||||||
|
|
||||||
|
rootLogger.level = info
|
||||||
|
rootLogger.appenderRef.rolling.ref = rolling
|
||||||
|
|
||||||
|
######## Deprecation JSON #######################
|
||||||
|
appender.deprecation_rolling.type = Console
|
||||||
|
appender.deprecation_rolling.name = deprecation_rolling
|
||||||
|
appender.deprecation_rolling.layout.type = ESJsonLayout
|
||||||
|
appender.deprecation_rolling.layout.type_name = deprecation.elasticsearch
|
||||||
|
appender.deprecation_rolling.layout.esmessagefields=x-opaque-id,key,category,elasticsearch.elastic_product_origin
|
||||||
|
appender.deprecation_rolling.filter.rate_limit.type = RateLimitingFilter
|
||||||
|
|
||||||
|
appender.header_warning.type = HeaderWarningAppender
|
||||||
|
appender.header_warning.name = header_warning
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
logger.deprecation.name = org.elasticsearch.deprecation
|
||||||
|
logger.deprecation.level = WARN
|
||||||
|
logger.deprecation.appenderRef.deprecation_rolling.ref = deprecation_rolling
|
||||||
|
logger.deprecation.appenderRef.header_warning.ref = header_warning
|
||||||
|
logger.deprecation.additivity = false
|
||||||
|
|
||||||
|
######## Search slowlog JSON ####################
|
||||||
|
appender.index_search_slowlog_rolling.type = Console
|
||||||
|
appender.index_search_slowlog_rolling.name = index_search_slowlog_rolling
|
||||||
|
appender.index_search_slowlog_rolling.layout.type = ESJsonLayout
|
||||||
|
appender.index_search_slowlog_rolling.layout.type_name = index_search_slowlog
|
||||||
|
appender.index_search_slowlog_rolling.layout.esmessagefields=message,took,took_millis,total_hits,types,stats,search_type,total_shards,source,id
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
logger.index_search_slowlog_rolling.name = index.search.slowlog
|
||||||
|
logger.index_search_slowlog_rolling.level = trace
|
||||||
|
logger.index_search_slowlog_rolling.appenderRef.index_search_slowlog_rolling.ref = index_search_slowlog_rolling
|
||||||
|
logger.index_search_slowlog_rolling.additivity = false
|
||||||
|
|
||||||
|
######## Indexing slowlog JSON ##################
|
||||||
|
appender.index_indexing_slowlog_rolling.type = Console
|
||||||
|
appender.index_indexing_slowlog_rolling.name = index_indexing_slowlog_rolling
|
||||||
|
appender.index_indexing_slowlog_rolling.layout.type = ESJsonLayout
|
||||||
|
appender.index_indexing_slowlog_rolling.layout.type_name = index_indexing_slowlog
|
||||||
|
appender.index_indexing_slowlog_rolling.layout.esmessagefields=message,took,took_millis,doc_type,id,routing,source
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
logger.index_indexing_slowlog.name = index.indexing.slowlog.index
|
||||||
|
logger.index_indexing_slowlog.level = trace
|
||||||
|
logger.index_indexing_slowlog.appenderRef.index_indexing_slowlog_rolling.ref = index_indexing_slowlog_rolling
|
||||||
|
logger.index_indexing_slowlog.additivity = false
|
||||||
|
|
||||||
|
appender.audit_rolling.type = Console
|
||||||
|
appender.audit_rolling.name = audit_rolling
|
||||||
|
appender.audit_rolling.layout.type = PatternLayout
|
||||||
|
appender.audit_rolling.layout.pattern = {\
|
||||||
|
"type":"audit", \
|
||||||
|
"timestamp":"%d{yyyy-MM-dd'T'HH:mm:ss,SSSZ}"\
|
||||||
|
%varsNotEmpty{, "node.name":"%enc{%map{node.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "node.id":"%enc{%map{node.id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "host.name":"%enc{%map{host.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "host.ip":"%enc{%map{host.ip}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "event.type":"%enc{%map{event.type}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "event.action":"%enc{%map{event.action}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "authentication.type":"%enc{%map{authentication.type}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.name":"%enc{%map{user.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.run_by.name":"%enc{%map{user.run_by.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.run_as.name":"%enc{%map{user.run_as.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.realm":"%enc{%map{user.realm}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.run_by.realm":"%enc{%map{user.run_by.realm}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.run_as.realm":"%enc{%map{user.run_as.realm}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "user.roles":%map{user.roles}}\
|
||||||
|
%varsNotEmpty{, "apikey.id":"%enc{%map{apikey.id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "apikey.name":"%enc{%map{apikey.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "authentication.token.name":"%enc{%map{authentication.token.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "authentication.token.type":"%enc{%map{authentication.token.type}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "origin.type":"%enc{%map{origin.type}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "origin.address":"%enc{%map{origin.address}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "realm":"%enc{%map{realm}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "url.path":"%enc{%map{url.path}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "url.query":"%enc{%map{url.query}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "request.method":"%enc{%map{request.method}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "request.body":"%enc{%map{request.body}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "request.id":"%enc{%map{request.id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "action":"%enc{%map{action}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "request.name":"%enc{%map{request.name}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "indices":%map{indices}}\
|
||||||
|
%varsNotEmpty{, "opaque_id":"%enc{%map{opaque_id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "trace.id":"%enc{%map{trace.id}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "x_forwarded_for":"%enc{%map{x_forwarded_for}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "transport.profile":"%enc{%map{transport.profile}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "rule":"%enc{%map{rule}}{JSON}"}\
|
||||||
|
%varsNotEmpty{, "put":%map{put}}\
|
||||||
|
%varsNotEmpty{, "delete":%map{delete}}\
|
||||||
|
%varsNotEmpty{, "change":%map{change}}\
|
||||||
|
%varsNotEmpty{, "create":%map{create}}\
|
||||||
|
%varsNotEmpty{, "invalidate":%map{invalidate}}\
|
||||||
|
}%n
|
||||||
|
# "node.name" node name from the `elasticsearch.yml` settings
|
||||||
|
# "node.id" node id which should not change between cluster restarts
|
||||||
|
# "host.name" unresolved hostname of the local node
|
||||||
|
# "host.ip" the local bound ip (i.e. the ip listening for connections)
|
||||||
|
# "origin.type" a received REST request is translated into one or more transport requests. This indicates which processing layer generated the event "rest" or "transport" (internal)
|
||||||
|
# "event.action" the name of the audited event, eg. "authentication_failed", "access_granted", "run_as_granted", etc.
|
||||||
|
# "authentication.type" one of "realm", "api_key", "token", "anonymous" or "internal"
|
||||||
|
# "user.name" the subject name as authenticated by a realm
|
||||||
|
# "user.run_by.name" the original authenticated subject name that is impersonating another one.
|
||||||
|
# "user.run_as.name" if this "event.action" is of a run_as type, this is the subject name to be impersonated as.
|
||||||
|
# "user.realm" the name of the realm that authenticated "user.name"
|
||||||
|
# "user.run_by.realm" the realm name of the impersonating subject ("user.run_by.name")
|
||||||
|
# "user.run_as.realm" if this "event.action" is of a run_as type, this is the realm name the impersonated user is looked up from
|
||||||
|
# "user.roles" the roles array of the user; these are the roles that are granting privileges
|
||||||
|
# "apikey.id" this field is present if and only if the "authentication.type" is "api_key"
|
||||||
|
# "apikey.name" this field is present if and only if the "authentication.type" is "api_key"
|
||||||
|
# "authentication.token.name" this field is present if and only if the authenticating credential is a service account token
|
||||||
|
# "authentication.token.type" this field is present if and only if the authenticating credential is a service account token
|
||||||
|
# "event.type" informs about what internal system generated the event; possible values are "rest", "transport", "ip_filter" and "security_config_change"
|
||||||
|
# "origin.address" the remote address and port of the first network hop, i.e. a REST proxy or another cluster node
|
||||||
|
# "realm" name of a realm that has generated an "authentication_failed" or an "authentication_successful"; the subject is not yet authenticated
|
||||||
|
# "url.path" the URI component between the port and the query string; it is percent (URL) encoded
|
||||||
|
# "url.query" the URI component after the path and before the fragment; it is percent (URL) encoded
|
||||||
|
# "request.method" the method of the HTTP request, i.e. one of GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH, TRACE, CONNECT
|
||||||
|
# "request.body" the content of the request body entity, JSON escaped
|
||||||
|
# "request.id" a synthetic identifier for the incoming request, this is unique per incoming request, and consistent across all audit events generated by that request
|
||||||
|
# "action" an action is the most granular operation that is authorized and this identifies it in a namespaced way (internal)
|
||||||
|
# "request.name" if the event is in connection to a transport message this is the name of the request class, similar to how rest requests are identified by the url path (internal)
|
||||||
|
# "indices" the array of indices that the "action" is acting upon
|
||||||
|
# "opaque_id" opaque value conveyed by the "X-Opaque-Id" request header
|
||||||
|
# "trace_id" an identifier conveyed by the part of "traceparent" request header
|
||||||
|
# "x_forwarded_for" the addresses from the "X-Forwarded-For" request header, as a verbatim string value (not an array)
|
||||||
|
# "transport.profile" name of the transport profile in case this is a "connection_granted" or "connection_denied" event
|
||||||
|
# "rule" name of the applied rule if the "origin.type" is "ip_filter"
|
||||||
|
# the "put", "delete", "change", "create", "invalidate" fields are only present
|
||||||
|
# when the "event.type" is "security_config_change" and contain the security config change (as an object) taking effect
|
||||||
|
|
||||||
|
logger.xpack_security_audit_logfile.name = org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrail
|
||||||
|
logger.xpack_security_audit_logfile.level = info
|
||||||
|
logger.xpack_security_audit_logfile.appenderRef.audit_rolling.ref = audit_rolling
|
||||||
|
logger.xpack_security_audit_logfile.additivity = false
|
||||||
|
|
||||||
|
logger.xmlsig.name = org.apache.xml.security.signature.XMLSignature
|
||||||
|
logger.xmlsig.level = error
|
||||||
|
logger.samlxml_decrypt.name = org.opensaml.xmlsec.encryption.support.Decrypter
|
||||||
|
logger.samlxml_decrypt.level = fatal
|
||||||
|
logger.saml2_decrypt.name = org.opensaml.saml.saml2.encryption.Decrypter
|
||||||
|
logger.saml2_decrypt.level = fatal
|
14
config/role_mapping.yml
Normal file
14
config/role_mapping.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Role mapping configuration file which has elasticsearch roles as keys
|
||||||
|
# that map to one or more user or group distinguished names
|
||||||
|
|
||||||
|
#roleA: this is an elasticsearch role
|
||||||
|
# - groupA-DN this is a group distinguished name
|
||||||
|
# - groupB-DN
|
||||||
|
# - user1-DN this is the full user distinguished name
|
||||||
|
|
||||||
|
#power_user:
|
||||||
|
# - "cn=admins,dc=example,dc=com"
|
||||||
|
#user:
|
||||||
|
# - "cn=users,dc=example,dc=com"
|
||||||
|
# - "cn=admins,dc=example,dc=com"
|
||||||
|
# - "cn=John Doe,cn=other users,dc=example,dc=com"
|
3
config/roles.yml
Normal file
3
config/roles.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# The default roles file is empty as the preferred method of defining roles is
|
||||||
|
# through the API/UI. File based roles are useful in error scenarios when the
|
||||||
|
# API based roles may not be available.
|
0
config/users
Normal file
0
config/users
Normal file
0
config/users_roles
Normal file
0
config/users_roles
Normal file
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
services:
|
||||||
|
es:
|
||||||
|
image: wandoubaba517/elasticsearch-ik:7.17.18
|
||||||
|
container_name: es
|
||||||
|
environment:
|
||||||
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||||
|
- bootstrap.memory_lock=true
|
||||||
|
- discovery.type=single-node
|
||||||
|
ulimits:
|
||||||
|
memlock:
|
||||||
|
soft: -1
|
||||||
|
hard: -1
|
||||||
|
volumes:
|
||||||
|
- ./data:/usr/share/elasticsearch/data
|
||||||
|
- ./config:/usr/share/elasticsearch/config
|
||||||
|
network_mode: host
|
Loading…
Reference in New Issue
Block a user