# OpenObserve

Use the OpenObserve output plugin to ingest logs into [OpenObserve](https://openobserve.ai/).

Before you begin, you need the following fields, which can be found under **Ingestion** in OpenObserve Cloud. Alternatively, you can achieve this with various installation types as mentioned in the [OpenObserve documentation](https://openobserve.ai/docs/getting-started/):

* [OpenObserve account](https://cloud.openobserve.ai/web/)
* `HTTP_User`
* `HTTP_Passwd`

## Configuration parameters

This plugin supports the following parameters:

| Key                | Description                                                                                                                    | Default                      |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------- |
| `compress`         | Recommended. Compresses the payload in GZIP format. OpenObserve recommends setting this to `gzip` for optimized log ingestion. | *none*                       |
| `format`           | The format of the log payload. OpenObserve expects JSON.                                                                       | `json`                       |
| `host`             | The OpenObserve server where you are sending logs.                                                                             | `localhost`                  |
| `http_passwd`      | Password for HTTP authentication.                                                                                              | *none*                       |
| `http_user`        | Username for HTTP authentication.                                                                                              | *none*                       |
| `include_tag_key`  | If `true`, a tag is appended to the output. The key name is used in the `tag_key` property.                                    | `false`                      |
| `json_date_format` | Optional. The format of the date in logs. OpenObserve supports ISO 8601.                                                       | `iso8601`                    |
| `json_date_key`    | Optional. The JSON key used for timestamps in the logs.                                                                        | `timestamp`                  |
| `tls`              | Enable end-to-end security using TLS. Set to `on` to enable TLS communication with OpenObserve.                                | `on`                         |
| `uri`              | The API path used to send logs.                                                                                                | `/api/default/default/_json` |

### Configuration file

Use this configuration file to get started:

{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:

  outputs:
    - name: http
      match: '*'
      uri: /api/default/default/_json
      host: localhost
      port: 5080
      tls: on
      format: json
      json_date_key: timestamp
      json_date_format: iso8601
      http_user: <YOUR_HTTP_USER>
      http_passwd: <YOUR_HTTP_PASSWORD>
      compress: gzip

```

{% endtab %}

{% tab title="fluent-bit.conf" %}

```
[OUTPUT]
  Name http
  Match *
  URI /api/default/default/_json
  Host localhost
  Port 5080
  Tls on
  Format json
  Json_Date_Key    timestamp
  Json_Date_Format iso8601
  HTTP_User <YOUR_HTTP_USER>
  HTTP_Passwd <YOUR_HTTP_PASSWORD>
  Compress gzip
```

{% 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.fluentbit.io/manual/data-pipeline/outputs/openobserve.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.
