Trying to run influxdb in debug mode using docker

Hi,

I am trying to run Influxdb in debug mode but has been unsuccessful so far and all I see is level info messages in the container logs. can anyone tell me how to get it running in debug mode?
I’ve tried

docker run -p 8086:8086 \
    -e INFLUXDB_LOGGING_LEVEL=debug \
    -v influxdb:/var/lib/influxdb \
    influxdb

and docker-compose

version: '3'
services:
  influxdb:
    container_name: influxb
    restart: on-failure
    image: influxdb:1.0
    volumes:
      - influxdb_data:/var/lib/influxdb
      - /tmp/influxdb.conf:/etc/influxdb/influxdb.conf
    ports:
      - 8086:8086
    environment:
      - INFLUXDB_HTTP_LOG_ENABLED=true
      - INFLUXDB_LOGGING_LEVEL=debug

The conf file inside the container looks like

[logging]
  format = "auto"
  level = "debug"
  suppress-logo = false

[meta]
    dir = "/var/lib/influxdb/meta"

[data]
    dir = "/var/lib/influxdb/data"
    engine = "tsm1"
    wal-dir = "/var/lib/influxdb/wal"
[admin]
  enabled = true
  bind-address = ":8083"

This works. Can you describe what you mean by “unsuccessful”, please?

I am only able to see the logs in INFO mode and nothing in debug. These are container logs I am assuming as I did not run any command to view the logs

example :

ts=2019-06-04T16:01:22.095585Z lvl=info msg="Storing statistics" log_id=0FpoQWH0000 service=monitor db_instance=_internal db_rp=monitor interval=10s
ts=2019-06-04T16:01:22.095845Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0FpoQWH0000
ts=2019-06-04T16:01:22.096307Z lvl=info msg="Listening for signals" log_id=0FpoQWH0000
ts=2019-06-04T16:31:20.004232Z lvl=info msg="Retention policy deletion check (start)" log_id=0FpoQWH0000 service=retention trace_id=0Fpq8Fm0000 op_name=retention_delete_check op_event=start
ts=2019-06-04T16:31:20.004635Z lvl=info msg="Retention policy deletion check (end)" log_id=0FpoQWH0000 service=retention trace_id=0Fpq8Fm0000 op_name=retention_delete_check op_event=end op_elapsed=0.281ms
ts=2019-06-04T17:01:17.913171Z lvl=info msg="Retention policy deletion check (start)" log_id=0FpoQWH0000 service=retention trace_id=0FprqzrG000 op_name=retention_delete_check op_event=start
ts=2019-06-04T17:01:17.913323Z lvl=info msg="Retention policy deletion check (end)" log_id=0FpoQWH0000 service=retention trace_id=0FprqzrG000 op_name=retention_delete_check op_event=end op_elapsed=0.166ms

I believe this is because InfluxDB doesn’t use much debug logging.

Change debug to error and you’ll get no logs. So the setting is working, but the log level is rarely used in the codebase.

The reason i wanted to debug is that when i send data from logstash to influxdb, i see data loss and i dont see any errors in logstash pipeline and influxdb doesnt report anything in info. I turned debug logs on for influxdb but all is see is info similar to below

influxb | [httpd] 172.21.0.1 - - [31/May/2019:18:46:36 +0000] "POST /write?db=arti_test&precision=ms&rp=autogen HTTP/1.1" 204 0 "-" "Ruby" 6aeb3f3a-83d4-11e9-8064-0242ac150002 13015

which gives me no clue on what data it’s writing in the database and how to actually match the raw data to influx data.
This issue is also reported here but i didnot find any issues with the plugin.

Can you provide a copy of the file you’re sending to InfluxDB with this plugin?

sure. this issue has the information which i asked in the other community as well but didn’t get any response

From what I can tell, I believe the way you’re breaking down the lines; it’s rejecting those 3 as duplicate lines.

If you add statuscode as a tag, I believe it will help (as your 304 matches the 200 request but this value is lost)

Also, I believe you have misconfigured the file extension match (you’re overwriting resource_name)

Hope this helps

Thanks for the reply. I did find a way to update the last 9 digits of timestamp which should fix the issue