Aiven supports integrating logs with a number of external monitoring systems that support rsyslog protocol, including Papertrail.

To integrate your service with Papertrail, a new endpoint needs to be added into the project that contains the service you want to integrate. This can be done using the Aiven console or via the command line using the Aiven Client.

Before adding an endpoint you will need to create a Papertrail log destination. As Papertrail identifies the client based on the server and port you only need to copy the appropriate values from the "Log Destinations" page in Papertrail Console (under Settings tab) and use those as the values for server and port respectively.

Add Papertrail endpoint using Aiven Console 

From the Aiven console, navigate to your project and select Service Integrations on the left hand side and navigate to Syslog configuration.

When defining the syslog server, the following parameters can be applied

  • name - Create a name for this endpoint (e.g. Papertrail)
  • server - DNS name or IPv4 address of the Papertrail server
  • port - Papertrail port to connect to
  • tls - set to true
  • format - set to rfc3164

Next, open your service in Aiven console and under Service Integrations option, click Manage Integrations which will bring up a list of available integrations for your service. Select Rsyslog from the provided list and click Use integration.


Finally, select an endpoint that you created in previous step and click Enable to enable service integration.


After enabling service integration, you can see that it has been activated in the Aiven console and the logs will be now integrated with Papertrail. It may take a few moments to setup the new log, and you can track the status in your service overview.

Your service should now be visible on Papertrail Dashboard under All Systems. In the example below there are two systems because our PostgreSQL service has two nodes.

You can now click on the corresponding system to view the logs that it has produced.

Add Papertrail endpoint using Aiven client

From the Aiven client, enter the following command, replacing values as specified below. You do not need the ca-bundle as Papertrail's servers use certificates signed by known CAs. You also need to set the format to rfc3164 and enable TLS to enhance security.

avn service integration-endpoint-create --project your-project \
    -d papertrail -t rsyslog \
    -c server=logsN.papertrailapp.com -c port=XXXXX \
    -c format=rfc3164 -c tls=true


When defining the remote syslog server the following parameters can be applied

required:

  • your-project - Name of your Aiven project
  • server -  DNS name or IPv4 address of the Papertrail server
  • port - Papertrail port to connect to
  • format - set to rfc3164
  • tls - set to true

Add rsyslog integration to service

First you need the id of the endpoint previously created 

avn service integration-endpoint-list --project your-project
ENDPOINT_ID                           ENDPOINT_NAME   ENDPOINT_TYPE
====================================  ==============  =============
618fb764-5832-4636-ba26-0d9857222cfd  example-syslog  rsyslog

Using the ENDPOINT_ID from above and you can now link the service to the endpoint

avn service integration-create --project your-project \
    -t rsyslog -s your-service \
    -D 618fb764-5832-4636-ba26-0d9857222cfd


Your service should now be visible on Papertrail Dashboard under All Systems. In the example below there are two systems because our PostgreSQL service has two nodes.

You can now click on the corresponding system to view the logs that it has produced.

Additional articles may be found on our Aiven Support page.

If you have any questions with integration, please feel free to reach out to Support and let us know.

Did this answer your question?