Occasionally there is a need to inspect logs from Aiven services. For example, to debug query performance or inspecting errors caused by a specific workload.

There are three built-in ways to inspect service logs at Aiven:

  • In Aiven console, when selecting a specific service, under "Logs" tab recent events are available. Logs can be browsed back in time, but scrolling up several thousand lines is not very convenient.
  • Aiven command-line client supports programmatically downloading logs. avn service logs -S desc -f --project your-project-name your-service-name will show all stored logs.
  • Aiven API endpoint is available for fetching the same information two above methods output, in case programmatic access is needed.

Service logs included on the normal service price are stored only for a few days. Unless you are using logs integration to another service, older logs are not accessible.

If longer retention time or more comprehensive analytics or search functionality is needed, logs can be forwarded to Aiven Elasticsearch service. This will allow you to configure longer retention times for your service logs, only limited by disk space available on the Elasticsearch plan you have selected. Elasticsearch together with Kibana offers comprehensive logs browsing and analytics platform.

Did this answer your question?