IBM Support

Method to check whether Kafka has started and how long it took to start

How To


Summary

There are times when you need to determine whether Kafka has started successfully.
There are also times when you need to know how long it took to start.
Those information can be found in the Kafka pod log itself.

Steps

(1) Open the Kafka pod log:
oc logs <kafka-pod> | less
Eg.
oc logs iaf-system-kafka-0 | less
(2) Look out for the first log message and take note of the datetime.
Eg.
2024-05-10 17:32:15,829 INFO Starting KafkaAgent with brokerReadyFile=/var/opt/kafka/kafka-ready, sessionConnectedFile=/var/opt/kafka/zk-connected, sslKeyStorePath=/tmp/kafka/cluster.keystore.p12, sslTrustStore=/tmp/kafka/cluster.truststore.p12 (io.strimzi.kafka.agent.KafkaAgent) [main]
(3) Look out for the log message that shows Kafka has started and take note of the datetime.
Eg.
2024-05-10 17:32:36,948 INFO [KafkaServer id=1] started (kafka.server.KafkaServer) [main]
NOTE: If you are unable to find the "Kafka started" log message, please contact IBM Support.
(4) The duration for the start can be calculated by subtracting the datetime of (2) from (3). 
Eg.
2024-05-10 17:32:36,948 - 2024-05-10 17:32:15,829 = 21 seconds

Additional Information

The duration calculation of the start time is important because it is needed to decide suitable values for the "initialDelaySeconds" and "periodSeconds" of the liveness and readiness probes of the Kafka pod.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSE9G0Q","label":"IBM Cloud Pak for AIOps"},"ARM Category":[{"code":"a8m3p000000PCCfAAO","label":"Watson AIOps-\u003EAI Manager-\u003EIBM-Common-Services-\u003EIAF\/Kafka"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
16 May 2024

UID

ibm17152849