Configuring Docker Logging Drivers

Docker includes logging mechanisms called “logging drivers” to help you get information from the running containers. You can configure a NetScaler CPX container to forward logs that it generates to the docker logging drivers. For more information on docker logging drivers, see https://docs.docker.com/config/containers/logging/configure/.

By default, all logs generated by the NetScaler CPX container are stored in /cpx/log/ns.log file on the docker host. When you start the NetScaler CPX container using the docker run command, you can configure it to forward all the generated logs to a docker logging driver using the --log-driver option. If the logging driver has configurable parameters, you can set them using the --log-opt <NAME>=<VALUE> option.

In the following example, the NetScaler CPX container is configured to forward all the generated logs using syslog as logging driver.

docker run -dt --privileged=true --log-driver syslog --log-opt syslog-address=udp://10.106.102.190:514 -e EULA=yes --ulimit core=-1 --name test store/citrix/netscalercpx:12.1-48.13
<!--NeedCopy-->

Similarly, in the following example the NetScaler CPX container is configured to forward all the generated logs using Splunk as logging driver.

docker run -dt --privileged=true --log-driver=splunk --log-opt splunk-token=176FCEBF-4CF5-4EDF-91BC-703796522D20 --log-opt splunk-url=https://splunkhost:8088 -e EULA=yes --ulimit core=-1 --name test store/citrix/netscalercpx:12.1-48.13
<!--NeedCopy-->
Configuring Docker Logging Drivers