Logging
There are a number of different ways to review logs and metrics for your Managed Service for TimescaleDB services. You can use the native logging tool in the web console, retrieve details logs using the Aiven CLI tool, or integrate a third-party service, such as SolarWinds Loggly.
Native logging
To see the most recent logged events for your service, in the Services
tab, find the service you want to review, and check it is marked as Running
. Navigate to the Logs
tab to see a constantly updated list of logged events.
Dump logs to a text file with the Aiven CLI
If you want to dump your Managed Service for TimescaleDB logs to a text file or an archive for use later on, you can use the Aiven CLI.
Log in to your Managed Service for TimescaleDB account from the Aiven CLI tool, and use this command to dump your logs to a text file called tslogs.txt
:
avn service logs -S desc -f --project <project name> <service_name> > tslogs.txt
For more information about the Aiven CLI tool, see the Aiven CLI section.
Logging integrations
If you need to access logs for your services regularly, or if you need more detailed logging than Managed Service for TimescaleDB can provide in the web console, you can connect your Managed Service for TimescaleDB to a logging service such as SolarWinds Loggly.
This section covers how to create a service integration to Loggly with Managed Service for TimescaleDB.
Creating a Loggly service integration
Navigate to SolarWinds Loggly and create or log in to your account.
From the Loggly Home screen, navigate to
Logs
→Source Setup
. ClickCustomer Tokens
from the top menu bar.On the
Customer Tokens
page, clickAdd New
to create a new token. Give your token a name, and clickSave
. Copy your new token to your clipboard.Log in to your Managed Service for TimescaleDB account, and navigate to
Service Integrations
.In the
Service Integrations
page, navigate toSyslog
, and clickAdd new endpoint
.In the
Create new syslog endpoint
dialog, complete these fields:- In the
Endpoint name
field, type a name for your endpoint. - In the
Server
field, typelogs-01.loggly.com
. - In the
Port
field, type514
. - Uncheck the
TLS
checkbox. - In the
Format
field, selectrfc5425
. - In the
Structured Data
field, type<LOGGLY_TOKEN>@41058
, using the Loggly token you copied earlier. You can also add a tag here, which you can use to more easily search for your logs in Loggly. For example,[[email protected]](https://docs.timescale.com/cdn-cgi/l/email-protection) TAG="example-tag"
.
Click
Create
to create the endpoint. When the endpoint has been created, it shows as an enabled service integration, with a greenactive
indicator.- In the
In the Loggly dashboard, navigate to
Search
to see your incoming logs. From here, you can create custom dashboards and view reports for your logs.