Hi,
I'm currently trying very hard to implement logging of the Zookeeper container logs into an external source (ELK/SPLUNK)
The most simple way is to add log4j appenders to the log4j configuration of Zookeeper before startup.
However, the default Configmap supplied with the ZookeeperCluster CR is non-configurable.
I also tried some other solutions regarding initContainer and changing of environment variables, but to no success.
Importance
Must-have.
Location
I’m not sure tbh, but it must be something regarding the CRD scheme, and also the code where the default ConfigMap gets created.
Suggestions for an improvement
An option in the ZookeeperCluster CR to configure the default Configmap supplied to the Zookeeper container.
for example:
spec:
logging:
type: external
valueFrom:
configMapKeyRef:
name: my-config-map
key: my-config-map-key
A different approach could be removing the static reference of "LOG4J_CONF" in the zookeeperStart.sh script,
and then allowing members to dynamically set said environment variable to the path of a new log4j.properties file
Any alternatives you think of, are welcome here.
Thanks.
Description
Hi, I'm currently trying very hard to implement logging of the Zookeeper container logs into an external source (ELK/SPLUNK) The most simple way is to add log4j appenders to the log4j configuration of Zookeeper before startup. However, the default Configmap supplied with the ZookeeperCluster CR is non-configurable. I also tried some other solutions regarding initContainer and changing of environment variables, but to no success.
Importance
Must-have.
Location
I’m not sure tbh, but it must be something regarding the CRD scheme, and also the code where the default ConfigMap gets created.
Suggestions for an improvement
An option in the ZookeeperCluster CR to configure the default Configmap supplied to the Zookeeper container. for example: spec: logging: type: external valueFrom: configMapKeyRef: name: my-config-map key: my-config-map-key
A different approach could be removing the static reference of "LOG4J_CONF" in the zookeeperStart.sh script, and then allowing members to dynamically set said environment variable to the path of a new log4j.properties file
Any alternatives you think of, are welcome here. Thanks.