I use “InfluxDB 2.1.1 (git: 657e1839de) build_date: 2021-11-09T03:03:48Z” for Windows. I setup it in Jan 2022. Setup one bucket (never data override). I used python client to store and query data. Everything was ok. I did not touch it for 4 or 5 months, but today I found there is no data at all. My queries returns 0 records and so on. I open the Data explorer, but no data at all, no tags and so on
My script still is writing data to the bucket without any errors. but I cannot see any data.
Is there way to enable logging for Windows version (for Linux I understand how to od it, but in Windows I don’t see the config file)?
I tried ‘influx server-config -t “xxxx”’ and got ‘Error: failed to retrieve config: 404 Not Found: path not found’: Is it expected?
How I can determine what data is still in InfluxDB? It would be great to get examples and so on
Any ideas what is broken? and how to fix it?
I’m sorry to hear that.
Can you tell me a little bit more about your use case?
Can you successfully write any data to InfluxDB? Like with cURL?
What client library are you using?
Can you verify that it’s this one:
I might suggest also creating an issue above ^
Thanks for the reply. It seems the situation is better than I though before.
I use Python client v1.30.0
I fixed write by adding ‘WritePrecision.NS’: write_api.write(info[‘bucket’], info[‘org’], data,
WritePrecision.NS), ie I can see/select new data. I have idea that write works all time, but timestamps were interpreted in wrong way and all data is still in bucket but has wrong timestamps.
There are questions:
How I can dump everything from bucket to analyze what bucket actually contains?
Is it possible correct timestamps without recreating bucket?
Is it possible to delete part of data? How it may affect on the performance?
Of course! That’s what we’re here for
Perhaps you want to specify the timezone?
Specify for pandas DataFrame example:
port pandas as pd
from influxdb_client import InfluxDBClient
from influxdb_client.client.write_api import SYNCHRONOUS
url = "http://localhost:8086"
token = "my-token"
org = "my-org"
with InfluxDBClient(url=url, token=token, org=org) as client:
data_frame = pd.read_csv("path/to/1dSCCOPLMCOPX.csv")
:param data_frame: Pandas DataFrame to serialize
:param point_settings: Default Tags
:param precision: The precision for the unix timestamps within the body line-protocol.
:param chunk_size: The size of chunk for serializing into chunks.
:key data_frame_measurement_name: name of measurement for writing Pandas DataFrame
:key data_frame_tag_columns: list of DataFrame columns which are tags, rest columns will be fields
:key data_frame_timestamp_column: name of DataFrame column which contains a timestamp. The column can be defined as a :class:`~str` value
formatted as `2018-10-26`, `2018-10-26 12:00`, `2018-10-26 12:00:00-05:00`
or other formats and types supported by `pandas.to_datetime <https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.to_datetime.html#pandas.to_datetime>`_ - ``DataFrame``
:key data_frame_timestamp_timezone: name of the timezone which is used for timestamp column - ``DataFrame``
""" # noqa: E501
# This function is hard to understand but for good reason:
# the approach used here is considerably more efficient
# than the alternatives.
# We build up a Python expression that efficiently converts a data point
# tuple into line-protocol entry, and then evaluate the expression
# as a lambda so that we can call it. This avoids the overhead of
# invoking a function on every data value - we only have one function
# call per row instead. The expression consists of exactly
Specify for point example:
point = Point.measurement("h2o") \
.tag("location", "europe") \
.field("level", True) \
Does that help?
PS what are you using Influx for? I love to hear about what users are doing with Influx but most people just like to get help and leave
If you want to make my day, feel free to share
Thanks for you help. Now I can see all data, but I don’t know what to do with it. All old data has the same timestamp: 1970-01-20 05:24:46 GMT :)))
Maybe influxdb store some internal timestamp when record added or something like this? otherwise I don’t see way how to restore original timestamps.
I use influxDB for storing telemetry of my smart house
it is about 50 records per minute, not so big.
It looks like your timestamp was written incorrectly. I’d double check the precision of your timestamp.
Note: InfluxDB often uses epoch 0 (
1970-01-01T00:00:00Z ) as a null timestamp equivalent. When you get timestamps from 1970 that tells me that theres some small error in writing or formatting your timestamp correctly.
That’s really cool that you’re using InfluxDB to monitor your smart house!