This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
Points sent via UDP are not stored in the correct database #647
Closed
Description
Overview
influxdb-python
: v.5.2.0python
: version 3.4.3- Machine: Window 10 + Windows subsystem for Linux (WSL)
Scenario
- Configured
udp
to be accessed via8089
- InfluxDB running via Powershell
- Python Script executed via WSL
Code
from influxdb import InfluxDBClient
def main():
client = InfluxDBClient(host='localhost',database='example',use_udp=True, udp_port=8089)
json_body = {
"tags": {
"host": "server01",
"region": "us-west"
},
"time": "2009-11-10T23:00:00Z",
"points": [{
"measurement": "cpu_load_short",
"fields": {
"value": 0.64
}
}]
}
try:
client.send_packet(json_body)
except Exception as e:
raise e
if __name__ == '__main__':
main()
Output
Instead of saving the information in the example
database the information is stored in a newly created database called udp
.
Metadata
Metadata
Assignees
Labels
No labels