> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/observability/logging-service/quick-start/send-logs-to-platform.md).

# Send Logs to the Platform

You can send logs to the Logging Service using Fluent Bit, or natively in the OpenTelemetry Protocol (OTLP) format. Based on your infrastructure—Kubernetes, Docker, Linux Systemd, HTTP, or OTLP—the configuration differs.

{% hint style="info" %}
**Prerequisites:**

* A `Ready` pipeline instance. To obtain `tcpAddress` or `httpAddress`, see [<mark style="color:blue;">Set Up a Logging Pipeline</mark>](/cloud/observability/logging-service/api-how-tos/set-up-logging-pipeline-instance.md).
* A [<mark style="color:blue;">key</mark>](/cloud/observability/logging-service/api-how-tos/obtain-key.md) obtained from the REST API.
* Fluent Bit installed on your system. For more information, refer to the [<mark style="color:blue;">Getting Started with Fluent Bit Documentation</mark>](https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bit).
  {% endhint %}

{% stepper %}
{% step %}

## Obtain the pipeline endpoint

After creating a pipeline, the response includes either a `tcpAddress` or `httpAddress`. Save this value.

Example TCP endpoint:

`12be6dbe134f-logs.3b0b424eb27f.logging.de-txl.ionos.com`

Example `HTTP` endpoint:

`https://12be6dbe134f-logs.3b0b424eb27f.logging.de-txl.ionos.com`
{% endstep %}

{% step %}

## Obtain a key

Use the `Shared_Key` (TCP) or `APIKEY` (`HTTP`) returned when you created the pipeline for authentication. To generate a new key, see [<mark style="color:blue;">Obtain a new Key</mark>](/cloud/observability/logging-service/api-how-tos/obtain-key.md).
{% endstep %}
{% endstepper %}

## Configure Fluent Bit

Each log source requires the pipeline endpoint and a key.

{% tabs %}
{% tab title="Kubernetes" %}

1. Install the Fluent Bit package for your Kubernetes distribution. For more information, refer to the [<mark style="color:blue;">Fluent Bit on Kubernetes Documentation</mark>](https://docs.fluentbit.io/manual/installation/downloads/kubernetes).
2. Update the Fluent Bit configuration with the `tcpAddress` and `Shared_Key`.
3. Run Fluent Bit to forward logs to the Logging Service.

```ini
[OUTPUT]
    Name            forward
    Match           *
    Port            9000
    Tag             <TAG>
    Host            <TCP_ENDPOINT>
    tls             on
    Shared_Key      <KEY>
```

{% hint style="warning" %}
**Warning:** The port must be set to **9000** when using TCP.
{% endhint %}

{% hint style="info" %}
**Note:** For more information, refer to the [<mark style="color:blue;">Kubernetes configuration examples</mark>](https://github.com/ionos-cloud/observability-services-user-documentation/tree/main/logging/examples/kubernetes).
{% endhint %}
{% endtab %}

{% tab title="Docker" %}

1. Install the Fluent Bit package for Docker. For more information, refer to the [<mark style="color:blue;">Fluent Bit on Docker Documentation</mark>](https://docs.fluentbit.io/manual/installation/downloads/docker).
2. Update the Fluent Bit configuration with the `tcpAddress` and `Shared_Key`.
3. Run Fluent Bit to forward logs to the Logging Service.

```ini
[OUTPUT]
    Name            forward
    Match           *
    Port            9000
    Tag             <TAG>
    Host            <TCP_ENDPOINT>
    tls             on
    Shared_Key      <KEY>
```

{% hint style="warning" %}
**Warning:** The port must be set to **9000** when using TCP.
{% endhint %}

{% hint style="info" %}
**Note:** For more information, refer to the [<mark style="color:blue;">Docker configuration examples</mark>](https://github.com/ionos-cloud/observability-services-user-documentation/tree/main/logging/examples/docker).
{% endhint %}
{% endtab %}

{% tab title="Linux Systemd" %}

1. Install the appropriate Fluent Bit package for your Linux distribution. For more information, refer to the [<mark style="color:blue;">Getting Started with Fluent Bit Documentation</mark>](https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bit).
2. Update the Fluent Bit configuration with the `tcpAddress` and `Shared_Key`.
3. Run Fluent Bit to forward logs to the Logging Service.

```ini
[OUTPUT]
    Name            forward
    Match           *
    Port            9000
    Tag             <TAG>
    Host            <TCP_ENDPOINT>
    tls             on
    Shared_Key      <KEY>
```

{% hint style="warning" %}
**Warning:** The port must be set to **9000** when using TCP.
{% endhint %}

{% hint style="info" %}
**Note:** For more information, refer to the [<mark style="color:blue;">Linux Systemd configuration examples</mark>](https://github.com/ionos-cloud/observability-services-user-documentation/tree/main/logging/examples/systemd).
{% endhint %}
{% endtab %}

{% tab title="HTTP" %}
Send logs directly via the `HTTP` REST endpoint. Only JSON-formatted logs are supported.

```bash
curl --location \
--request POST 'https://<HTTP_ENDPOINT>/<TAG>' \
--header 'Content-Type: application/json' \
--header 'APIKEY: <KEY>' \
--data '{
    "status": "Ready",
    "ts": 1580306777.04728,
    "pod": {
        "name": "Example Name",
        "namespace": "data"
    },
    "msg": "Pod status updated",
    "level": "error",
    "label_1": "test label"
}'
```

Alternatively, configure Fluent Bit to use the `HTTP` output plugin:

```ini
[OUTPUT]
    Name            http
    Match           *
    Host            <HTTPS_ENDPOINT>
    URI             /<TAG>
    Format          json
    Header          APIKEY <KEY>
    tls             on
    Port            443
```

{% endtab %}

{% tab title="OTLP" %}
Send logs directly in the OpenTelemetry Protocol (OTLP) format. This does not require Fluent Bit and works with any OTLP-compliant client, including the OpenTelemetry Collector.

```bash
curl --location \
--request POST 'https://<HTTP_ENDPOINT>/<TAG>' \
--header 'Content-Type: application/json' \
--header 'APIKEY: <KEY>' \
--data '{
  "resourceLogs": [
    {
      "resource": {
        "attributes": [
          { "key": "service.name", "value": { "stringValue": "my-payment-service" } }
        ]
      },
      "scopeLogs": [
        {
          "scope": { "name": "manual-http-logger" },
          "logRecords": [
            {
              "timeUnixNano": "1780669755483587000",
              "severityText": "INFO",
              "severityNumber": 9,
              "body": { "stringValue": "Transaction processed successfully for user_id 9482." }
            }
          ]
        }
      ]
    }
  ]
}'
```

Alternatively, configure an OpenTelemetry Collector `otlphttp` exporter:

```yaml
exporters:
  otlphttp:
    logs_endpoint: "https://<HTTP_ENDPOINT>/<TAG>"
    headers:
      APIKEY: "<KEY>"
```

{% endtab %}
{% endtabs %}

## Troubleshooting

1. **Verify:** Open the Logging Service dashboard and confirm that logs appear.
2. **Invalid key:** Check that you copied the correct `Shared_Key` or `APIKEY`.
3. **Connection errors:** Verify outbound access on port **9000** (TCP) or port **443** (`HTTP`).
4. **No logs displayed:** Enable verbose logging in Fluent Bit:

```ini
[OUTPUT]
    Log_Level      debug
```

For more information, see [<mark style="color:blue;">Fluent Bit global configuration</mark>](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/observability/logging-service/quick-start/send-logs-to-platform.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
