Influx not saving data?

Hi group,

I have a influxdb2 running in a docker container on GCP. The container has a google provisioned persistent volume mounted in the data folder so that my records persist any container restart/version bumps, etc.

The container has been running since december last year and I would have expected data to be coming in rather frequently since then. I took a look in one my primary bucket now, and I saw this:

influx query "from(bucket: \"my-bucket\") |> range(start: 0) |> filter(fn: (r) => r._field == \"pressure\")"

And to my dismay the oldest record I had was:

Table: keys: [_start, _stop, _field, _measurement, device_id, device_identifier, gateway_id_0, gateway_id_1, hardware_serial]
                   _start:time                      _stop:time           _field:string     _measurement:string        device_id:string  device_identifier:string     gateway_id_0:string     gateway_id_1:string  hardware_serial:string                      _time:time                  _value:float
------------------------------  ------------------------------  ----------------------  ----------------------  ----------------------  ------------------------  ----------------------  ----------------------  ----------------------  ------------------------------  ----------------------------
1970-01-01T00:00:00.000000000Z  2024-07-01T07:09:08.917346310Z                pressure                OBFUSCATED                       1                OBFUSCATED2        OBFUSCATED3        OBFUSCATED3        OBFUSCATED4  2024-06-26T22:52:13.163000000Z                          1008

I further queryed the bucket configuration which looks like this:

ID			Name		Retention	Shard group duration	Organization ID		Schema Type
hidden1	       my-bucket	infinite	168h0m0s		         hidden2	                      implicit

I have no scripts or cron jobs running that should clear out data. The container is based on the image influxdb:latest

What else could I check ?

influx query “from(bucket: "my-bucket") |> range(start: -30d) |> filter(fn: (r) => r._field == "pressure")”
could you run this query and check your data?

1 Like

Thank you for your reply,

Running that query yielded the same output as the original query I was using. The first record I get is the same one as pasted in the original post

I believe I have solved the problem. A classic PEBCAK.

I was mounting my persistent volume in /var/lib/influxdb instead of /var/lib/influxdb2. I have changed my kubernetes deployment descriptor now, modifying the mount path. Hopefully this was an easy fix to a silly mistake. I will leave this running for a few hours and verify this was in fact the cause of my headaches.

1 Like

nice that you were able to fix it!