# Log Security

The Logging Service is a versatile and accessible platform that allows you to conveniently store and manage logs from various sources. This platform offers a seamless log aggregation solution for logs generated within the <code class="expression">space.vars.ionos\_cloud</code> infrastructure, by your bare metal system, or another cloud environment. With its flexibility, you can effortlessly push logs from anywhere, ensuring comprehensive log monitoring and analysis.

The following two encryption mechanisms safeguard all HTTP or TCP communications that push logs:

* Transport Layer Security (TLS)
* KEY
  * If using HTTP, then the `APIKEY` must be specified in the header.
  * If using TCP, specify the `Shared_Key`.

The key brings an extra layer of security with which you can revoke or regenerate the existing key.

{% tabs %}
{% tab title="TCP" %}
When using TCP or TLS, set `tls` to on and provide a `Shared_Key` in the Fluent Bit configuration. The key can be obtained through the REST API. For more information, see [<mark style="color:blue;">Obtain a new Key</mark>](/cloud/observability/logging-service/api-how-tos/obtain-key.md).

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

{% hint style="info" %}
**Note:** To view a complete list of parameters, see [<mark style="color:blue;">Fluent Bit's official website</mark>](https://docs.fluentbit.io/manual/pipeline/outputs/forward).
{% endhint %}
{% endtab %}

{% tab title="HTTP" %}
If using HTTP (JSON), provide the key in the header as shown in the following example:

```bash
curl --location \ 
--request POST 'https://12be6dbe134f-logs.3b0b424eb27f.logging.de-txl.ionos.com/myhttp' \
--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
```

{% hint style="info" %}
**Note:** To view a complete list of parameters, see [<mark style="color:blue;">Fluent Bit's official website</mark>](https://docs.fluentbit.io/manual/pipeline/outputs/http).
{% endhint %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/observability/logging-service/overview/log-security.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
