Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
865 views
in Technique[技术] by (71.8m points)

yaml - logstash.yml file - want to change where the logs are saved

I'm trying to use the logstash.yml file to change where the logs are saved.

I am not familiar with log4j2 so cannot use that file for this(log4j2.properties).

But for some reason, the logstash.yml file does not change the log location, regardless of what I put. It works on a different server set up years ago that is being updated regularly. I've compared the files and they are identical.

Please help. I am so confused. It keeps defaulting to /usr/share. This is my redacted code.

    # ------------  Node identity ------------
    #
    # Use a descriptive name for the node:
    #
     node.name: twisty-logstash

    # ------------ Data path ------------------
    #
    # Which directory should be used by logstash and its 
    plugins
    # for any persistent needs. Defaults to 
    LOGSTASH_HOME/data
    #
    path.data: /var/lib/logstash

    # ------------ Pipeline Settings --------------
    pipeline.ordered: auto

    # ------------ Pipeline Configuration Settings --------
    config.reload.automatic: true
    config.reload.interval: 5s

I've bind the address and port.

    # ------------ Debugging Settings --------------
    log.level: debug
    path.logs: /var/log/logstash
    pipeline.separate_logs: true

    # ------------ Other Settings --------------
    pipeline.separate_logs: true
question from:https://stackoverflow.com/questions/65942465/logstash-yml-file-want-to-change-where-the-logs-are-saved

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...