How can I change the log file location for Zookeeper in 16.01 ?

In 16.01, I see that we need to create a separate file for each component with the name <component-name>.properties in /opt/apigee/customer/application/ directory to set the properties with appropriate values. So the filename for Zookeeper would zookeeper.properties.

By default, the Apache Zookeeper log files are kept in /<inst_root>/apigee/var/log/zookeeper directory. I am not able to find any information on what property should I set to change the log file location for Zookeeper.

Can someone let me know how to change the log file location for zookeeper ?

Solved Solved
0 4 3,156
1 ACCEPTED SOLUTION

Not applicable

Hi there!

You should be able to change the Zookeeper log directory using the following steps:

1. Create /opt/apigee/etc/apigee-zookeeper.d/APIGEE_APP_LOGDIR.sh

2. Update the /opt/apigee/etc/apigee-zookeeper.d/APIGEE_APP_LOGDIR.sh with the below properties:

APIGEE_APP_LOGDIR=/foo/bar

You can follow similar approach to update the all other components log directory. Here is the sample:

a. Create /opt/apigee/etc/{component}.d/APIGEE_APP_LOGDIR.sh

b. Update the /opt/apigee/etc/{component}.d/APIGEE_APP_LOGDIR.sh with the below properties:

APIGEE_APP_LOGDIR=/foo/bar

where {component} can be apigee-zookeeper or apigee-cassandra or edge-management-server or edge-message-processor or edge-qpid-server, etc

Hope this helps.

Thanks,

Archendra

View solution in original post

4 REPLIES 4

Not applicable

Hi there!

You should be able to change the Zookeeper log directory using the following steps:

1. Create /opt/apigee/etc/apigee-zookeeper.d/APIGEE_APP_LOGDIR.sh

2. Update the /opt/apigee/etc/apigee-zookeeper.d/APIGEE_APP_LOGDIR.sh with the below properties:

APIGEE_APP_LOGDIR=/foo/bar

You can follow similar approach to update the all other components log directory. Here is the sample:

a. Create /opt/apigee/etc/{component}.d/APIGEE_APP_LOGDIR.sh

b. Update the /opt/apigee/etc/{component}.d/APIGEE_APP_LOGDIR.sh with the below properties:

APIGEE_APP_LOGDIR=/foo/bar

where {component} can be apigee-zookeeper or apigee-cassandra or edge-management-server or edge-message-processor or edge-qpid-server, etc

Hope this helps.

Thanks,

Archendra

@archendra,

Thanks for sharing this information.

chiki_sun
Participant III

after following this setup, we now see some logs (say for zookeeper) in

$ ls -ltr /opt/apigee/var/log/apigee-zookeeper/ total 7447700 -rw-rw-r-- 1 apigee apigee 8897 May 15 14:14 config.log -rw-rw-r-- 1 apigee apigee 10486028 May 15 14:20 zookeeper.log.1 -rw-rw-r-- 1 apigee apigee 7613427820 May 15 15:14 zookeeper_trace.log -rw-rw-r-- 1 apigee apigee 2248374 May 15 15:14 zookeeper.log -rw-rw-r-- 1 apigee apigee 244153 May 22 14:18 apigee-zookeeper.log $

and some in

$ pwd /apiapp/logs/apigee-zookeeper $ ls -ltr total 474288 -rw-rw-r-- 1 apigee apigee 8883 May 19 17:07 config.log -rw-rw-r-- 1 apigee apigee 10485862 May 23 05:47 zookeeper.log.1 -rw-rw-r-- 1 apigee apigee 473057240 May 23 13:06 zookeeper_trace.log -rw-rw-r-- 1 apigee apigee 2101519 May 23 13:06 zookeeper.log $

here is my config

$ cat /opt/apigee/etc/apigee-zookeeper.d/APIGEE_APP_LOGDIR.sh APIGEE_APP_LOGDIR=/apiapp/logs/apigee-zookeeper

this happens to all components. is this normal? in this case, what is the different between

apigee-zookeeper.log and zookeeper.log?

Not applicable

Yes, it is normal. apigee-zookeeper.log is only logging stuff related to config changes (if there any) during zookeeper restart which you can ignore. zookeeper.log stores the logs related to actual zk process. Hope this helps.