# Configuring TLS on rsyslog

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fsyslog%2Fconfiguring-tls-on-rsyslog.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Fsyslog%2Fconfiguring-tls-on-rsyslog.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

## Introduction[​](#introduction "Direct link to Introduction")

This document explains how to configure rsyslog to support TLS connections, which is necessary for sending logs to Coralogix syslog endpoints.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

* Ubuntu 22.04 (or newer)

## Configuration[​](#configuration "Direct link to Configuration")

**STEP 1**. Install the `gtls driver` and `ca-certificates`:

```
sudo apt update -y

sudo apt install rsyslog-gnutls ca-certificates
```

**STEP 2**. Modify the rsyslog configuration file:

```
$DefaultNetstreamDriver gtls $DefaultNetstreamDriverCAFile /etc/ssl/certs/ca-certificates.crt $ActionSendStreamDriverMode 1 $ActionSendStreamDriverAuthMode x509/name $ActionSendStreamDriverPermittedPeer *.coralogix.com $template CoralogixSyslogFormat,"{\"fields\": {\"private_key\":\"xxxx\",\"application_name\":\"vagrant\",\"subsystem_name\":\"syslog\"},\"message\": {\"message\":\"%msg:::json%\"}}\n" *.* @@syslog.eu2.coralogix.com:6514;CoralogixSyslogFormat
```

**STEP 3**. Restart rsyslog:

```
sudo systemctl restart rsyslog
```

## Troubleshooting[​](#troubleshooting "Direct link to Troubleshooting")

**STEP 1**. Check the status of the rsyslog service:

```
sudo systemctl status rsyslog
```

**STEP 2**. Check for any errors in the journalctl logs:

```
sudo journalctl -f -u rsyslog
```

## Additional resources[​](#additional-resources "Direct link to Additional resources")

|                     |                                                                                                 |
| ------------------- | ----------------------------------------------------------------------------------------------- |
| Coralogix Endpoints | [Coralogix Endpoints](https://docs-docusaurus.kinsta.page/integrations/coralogix-endpoints/.md) |
