Log Streaming¶
Overview¶
This section describes how to troubleshoot log streaming setup.
You may contact CloudAEye at support@cloudaeye.com
for assistance after your initial investigation.
Microservices on Kubernetes (AWS EKS)¶
To debug: Run the update agent command. You will see that a helm command is printed in the terminal
Copy that command and set the –logs-destination
to stdout
.
helm upgrade cae-k8-agent cae-k8-agent \
--set agent.eks.ec2=true \
--create-namespace \
--namespace cloudaeye \
--set namespace=cloudaeye \
--set client.cloud_env=aws \
--set client.app_name="My App" \
--set client.app_key="MA" \
--repo https://cae-data-collection-agent.s3.us-east-2.amazonaws.com/kubernetes/helm/cae-k8-agent/charts \
--set user.key=QUtJQYOURKEY1NIMlc= \
--set user.secret=RjBsTWFWZ24YOURSECRETKEYeE5Jb0JPRmtpZg== \
--set client.cluster_name="my-cluster" \
--set logs.enabled=true \
--set logs.source=kubernetes \
--set "exclude_namespaces={cloudaeye}" \
--set logs.url=https://api.dev.cloudaeye.com/logstash-abcde0001-sockshop-logs-104 \
--set logs.kubernetes.controlPlaneEnabled=false \
--set logs.destination=stdout
This will print out the logs to the stdout of the agent's container. Please use kubectl logs
command to see the logs.
For example,
kubectl logs cae-k8-agent-v9vjw -n cloudaeye
If you can see your application's logs, then something is not working when the agent stream the logs to the http
destination.
If you do not see the application's logs, then the agent is not able to collect your application's log yet.
Please contact CloudAEye with details for assistance.
Containerized Applications (Docker on AWS EC2)¶
To debug:
Run the install agent command.
You will see a command is printed in the terminal.
Copy that command and set the FLUENT_LOG_DESTINATION
to stdout
.
docker run -d -p 24224:24224 \
--name cae-logs-agent \
--network test \
-e FLUENT_LOG_SOURCE_DOCKER=docker \
-e FLUENT_PLUGINS=docker \
-e FLUENT_UID=0 \
-e FLUENT_LOG_DESTINATION=stdout \
-e FLUENT_HTTP_ENDPOINT=https://api.dev.cloudaeye.com/logstash-abcde0001-sockshop-logs-104 \
-e CAE_CUSTOMER_ENV=aws \
-e APP_NAME="SockShop" \
-e APP_KEY="SOCKSHOP" \
-e CAE_ACCESS_KEY_ID=AKIA2YOURKEYQSYYCSH2W \
-e CAE_SECRET_ACCESS_KEY=F0lMaVgn26YOURSECRETKEY3ol5BQxNIoBOFkif public.ecr.aws/b1r6v2a5/cae-logs-agent:latest