elastic基本配置

作者: 席梦思 | 来源:发表于2017-04-11 22:31 被阅读55次

    配置文件

    两个本地配置文件 $ES_HOME/config:
    elastic配置文件:elasticsearch.yml

    elastic日志配置文件:log4j2.properties

    可以修改配置文件夹的路径:

    ./bin/elasticsearch -Epath.conf=/path/to/my/config

    配置文件的格式

    配置文件为YAML格式

    path: data: /var/lib/elasticsearch logs: /var/log/elasticsearch

    path.data: /var/lib/elasticsearchpath.logs: /var/log/elasticsearch

    环境变量配置

    node.name: ${HOSTNAME}network.host: ${ES_NETWORK_HOST}

    日志配置

    appender.rolling.type = RollingFile [图片上传中。。。(1)]appender.rolling.name = rollingappender.rolling.fileName = ${sys:es.logs}.log [图片上传中。。。(2)]appender.rolling.layout.type = PatternLayoutappender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %.10000m%nappender.rolling.filePattern = ${sys:es.logs}-%d{yyyy-MM-dd}.log [图片上传中。。。(3)]appender.rolling.policies.type = Policiesappender.rolling.policies.time.type = TimeBasedTriggeringPolicy [图片上传中。。。(4)]appender.rolling.policies.time.interval = 1 [图片上传中。。。(5)]appender.rolling.policies.time.modulate = true [图片上传中。。。(6)]

    [图片上传中。。。(7)]

    Configure the RollingFile
    appender

    [图片上传中。。。(8)]

    Log to /var/log/elasticsearch/production.log

    [图片上传中。。。(9)]

    Roll logs to /var/log/elasticsearch/production-yyyy-MM-dd.log

    [图片上传中。。。(10)]

    Using a time-based roll policy

    [图片上传中。。。(11)]

    Roll logs on a daily basis

    [图片上传中。。。(12)]

    Align rolls on the day boundary (as opposed to rolling every twenty-four hours)

    相关文章

      网友评论

        本文标题:elastic基本配置

        本文链接:https://www.haomeiwen.com/subject/tlcpattx.html