0
votes

I see that the RabbitMQ cluster initiates connection termination in my application logs. So I'd like to find out a reason. Click-to-deploy GCP's service was used to deploy a pretty standard RabbitMQ cluster. According to official RabbitMQ docs, the default logs location is $RABBITMQ_LOG_BASE/$RABBITMQ_NODENAME.log, however the $RABBITMQ_LOG_BASE isn't even set. The only env variable related to logs set is RABBITMQ_LOGS=-, which AFAICS resolves to sending all the logs to a stdout rather then a file.

So the question is: what should I do to find my logs (if there do exist and I missed something) or how can I modify my env/rabbitmq configuration file to ensure logs are written and accessible.

1
Did you check stackdriver?PaulProgrammer
@PaulProgrammer, I am pretty new to the GCP and might miss something. What's that? Additional logging aggregation service?Zazeil
Yep, nearly everything in GCP will be logged in the StackDriver service.PaulProgrammer
@PaulProgrammer, ouh, I'll try that, I made it old-fashioned way by interacting with container's bash via the console simulator GCP provides.Zazeil
@PaulProgrammer, well, I see nothing rabbitmq-specific there.Zazeil

1 Answers

1
votes

The path of RabbitMQ log file is /var/log/rabbitmq/log/ .

You can login your pod via command, I recommend this link for Get-shell-running-container:

gcloud container clusters get-credentials [CLUSTER_NAME] --zone [ZONE_NAME] --project [PROJECT_NAME] && kubectl exec -it [POD_NAME] -c rabbitmq -- /bin/bash

You have to enable “Stackdriver Metrics Exporter” when you use Click-to-deploy and config RabbitMQ, and then you can use tool “log viewer” to set filter and export logs in stackdriver.