# Configuraciones específicas

## InfluxDB 1.x

Configuración completa para habilitar el log y el registro de consultas lentas en InfluxDB 1.x

<pre data-overflow="wrap"><code>[meta]
  dir = "/var/lib/influxdb/meta"

[data]
  dir = "/var/lib/influxdb/data"
  wal-dir = "/var/lib/influxdb/wal"
<strong>  query-log-enabled = true
</strong>
[coordinator]
<strong>  log-queries-after = "1s"
</strong>
[logging]
  format = "auto"
  level = "info"

[http]
  enabled = true
  bind-address = ":8086"
  flux-enabled = true
</code></pre>

## InfluxDB 2.x

Puedes habilitar el logging detallado de consultas Flux en tu configuración de Docker Compose de InfluxDB 2.x

<pre data-overflow="wrap"><code>version: '3.8'

services:
  influxdb2:
    image: influxdb:2.7
    container_name: influxdb2
    restart: unless-stopped
    ports:
      - "8086:8086"
    volumes:
      - influxdb2-data:/var/lib/influxdb2
      - influxdb2-config:/etc/influxdb2
    environment:
      - DOCKER_INFLUXDB_INIT_MODE=setup
      - DOCKER_INFLUXDB_INIT_USERNAME=admin
      - DOCKER_INFLUXDB_INIT_PASSWORD=admin123
      - DOCKER_INFLUXDB_INIT_ORG=imagina
      - DOCKER_INFLUXDB_INIT_BUCKET=mi_bucket
      - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=mi_token_admin
<strong>      - INFLUXD_FLUX_LOG_ENABLED=true         # Habilita logs detallados de consultas Flux
</strong><strong>      - INFLUXD_LOG_LEVEL=info                # (Opcional) Nivel de detalle de los logs
</strong>
volumes:
  influxdb2-data:
  influxdb2-config:

</code></pre>

Habilitación de logs en la versión nativa al momento de arrancar influxDB 2.x

```
.\influxd --flux-log-enabled > influxdb.log 2>&1
```


---

# 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://darioaplicano.gitbook.io/influxdb2.x/sesion-6/guion-de-la-sesion/documentacion/logs/configuracion-logs-de-queries-segun-version/configuraciones-especificas.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.
