Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couln't write to influxdb with event trigger time timestamp #16

Open
srivari2021 opened this issue Nov 5, 2021 · 1 comment
Open

Couln't write to influxdb with event trigger time timestamp #16

srivari2021 opened this issue Nov 5, 2021 · 1 comment

Comments

@srivari2021
Copy link

Hi Team, Greetings

I am trying to write to influxdb without timestamp it works. by default it adds node-red timestamp in influxdb when it writes.
query shows the timestamp of the node-red.

{
"_msgid": "df366b6bdb1b98a9",
"payload": {
"data": {
"measurement": "customer_a",
"tags": {
"device_id": "mydevice-name"
},
"fields": {
"cycle_on": 1,
},
}
},
"topic": "customer_a"
}

but when i assign a timestamp value from payload / manually and it fails to write to influxdb. no error, not written in influxdb, nothing happening. no clue at all. can someone share light on this please?
{
"_msgid": "df366b6bdb1b98a9",
"payload": {
"data": {
"measurement": "customer_a",
"tags": {
"device_id": "mydevice-name"
},
"fields": {
"cycle_on": 1,
},
"timestamp": 1636097507
}
},
"topic": "customer_a"
}

@SebSeb11
Copy link

SebSeb11 commented Apr 26, 2023

Hi,
unfortunately I do have the same problem.
Using no timestamp is working. A wrong timestamp results in "bad timestamp".
A (hopefully) correct timestamp does not produce an error but no data is written to influxdb.

Edit/solution:
I had to set "precision" to "ms". Before it was "ns". There was no error because it was written to the DB. I did not see the measurements because I did not check for them at the time it was wrongly saved (years ago).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants