Dear all,
I need your advice.
I would like to place all logstash logs on the same location - /data01/logstash/logs
Where i should configure it?
I need all levels of logging: info, warn, error.
Currently my log4j2.properties is
name = LogstashPropertiesConfig
appender.rolling.type = RollingFile
appender.rolling.name = plain_rolling
appender.rolling.fileName = /data01/logstash/logs/logstash-${sys:ls.log.format}.log
appender.rolling.filePattern = /data01/logstash/logs/logstash-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
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.layout.type = PatternLayout
appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %-.10000m%n
appender.json_rolling.type = RollingFile
appender.json_rolling.name = json_rolling
appender.json_rolling.fileName = /data01/logstash/logs/logstash-${sys:ls.log.format}.log
appender.json_rolling.filePattern = /data01/logstash/logs/logstash-${sys:ls.log.format}-%d{yyyy-MM-dd}.log
appender.json_rolling.policies.type = Policies
appender.json_rolling.policies.time.type = TimeBasedTriggeringPolicy
appender.json_rolling.policies.time.interval = 1
appender.json_rolling.policies.time.modulate = true
appender.json_rolling.layout.type = JSONLayout
appender.json_rolling.layout.compact = true
appender.json_rolling.layout.eventEol = true
rootLogger.level = ${sys:ls.log.level}
rootLogger.appenderRef.rolling.ref = ${sys:ls.log.format}_rolling
My logstash.yml is
pipeline:
batch:
size: 125
delay: 5
pipeline.batch.size: 125
pipeline.batch.delay: 5
node.name: "logstash"
pipeline.workers: 1
pipeline.output.workers: 1
pipeline.batch.size: 125
pipeline.batch.delay: 5
pipeline.unsafe_shutdown: false
path.config: /etc/logstash/conf.d
config.string: /etc/logstash/conf.d
config.reload.automatic: true
config.reload.interval: 3600
config.debug: false
queue.type: memory
http.host: "127.0.0.1"
http.port: 9600-9700
log.level:
- fatal
- error
- warn
- info (default)
log.format: plain
path.logs: /data01/logstash/logs
log.level: info,warn,error
path.logs: /data01/logstash/logs