You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
I'm trying to make inserts via udp but nothings gets inserted.
Example:
from influxdb import InfluxDBClient
client = InfluxDBClient(host="influxdb", username="admin", password="xxx", database="xyz", use_udp=True, udp_port=8090)
line = "metric1,tag1=1,tag2=2 value1=100"
client.send_packet(line, protocol="line")
No insert happend.
After looking at the code of send_packet I got confused by line 879: data = ('\n'.join(packet) + '\n').encode('utf-8')
it turns the above line example to: b'm\ne\nt\nr\ni\nc\n1\n,\nt\na\ng\n1\n=\n1\n,\nt\na\ng\n2\n=\n2\n \nv\na\nl\nu\ne\n1\n=\n1\n0\n0\n'
When calling client.udp_socket.sendto(line, (client._host, client._udp_port))
The insert works, but is not the intended way I guess.
Another question:
Is it true that the maximum precision for udp inserts is seconds? If so, why and how to workaround?
To me the whole point of using udp is to get rid of the http overhead for high frequent inserts where millisecond timestamps are very likely imo.