How to change Logtash internal/system logs to local timezone?

we are running logstash as a pod in k8s, we're trying to change the timezone of logstash internal/system logs.
by default logs are coming in utc timezone


INFO ] 2020-08-12 07:26:19.757 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9600}
[INFO ] 2020-08-12 07:26:19.852 [[main]<kafka] AppInfoParser - Kafka version : 2.1.0
[INFO ] 2020-08-12 07:26:19.853 [[main]<kafka] AppInfoParser - Kafka commitId : eec43959745f444f
[WARN ] 2020-08-12 07:26:20.164 [Ruby-0-Thread-12: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-kafka-8.3.1/lib/logstash/inputs/kafka.rb:244] NetworkClient - [Consumer clientId=logstash-0, groupId=logstash] Error while fetching metadata with correlation id 2 : {VOLTHACTL-LOG=LEADER_NOT_AVAILABLE, FILEBEAT-LOG=LEADER_NOT_AVAILABLE, KAFKA-LOG=LEADER_NOT_AVAILABLE}
[INFO ] 2020-08-12 07:26:20.165 [Ruby-0-Thread-12: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-kafka-8.3.1/lib/logstash/inputs/kafka.rb:244] Metadata - Cluster ID: 3URWkrFCSfCMuxtQKOgm-g
[INFO ] 2020-08-12 07:26:20.167 [Ruby-0-Thread-12: /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-kafka-8.3.1/lib/logstash/inputs/kafka.rb:244] AbstractCoordinator - [Consumer clientId=logstash-0, groupId=logstash] Discovered group coordinator internal-kafka-0.internal-kafka-headless.default.svc.cluster.local:9092 (id: 2147482646 rack: null)

how to change timezone?

The logstash logs will be in whatever the local timezone of the server is. Changing that is a k8s question, not a logstash question.

Hi, localtimezone is IST i.e host machine, still it didn't work.
as logstash is using log4j2 library for logging, i made changes in that file( and it worked.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.