Questions tagged [influxdb-python]

Use this tag for questions about the InfluxDB-Python client library.

215 questions
1
vote
1 answer

Can't write dataframe to influxdb

I'm trying to write the following dataframe to influxdb using the DataFrameClient in the python driver. change price symbol volume Time 2019-05-09 10:00:00 1 22 ABCD 450 2019-05-09 10:00:00 2 4 …
ninesalt
  • 4,054
  • 5
  • 35
  • 75
1
vote
0 answers

How to populate HTML data to Grafana Ajax Plugin

I have a html content that gets generated dynamically and i want to display the same in the Grafana. Manually populating the Ajax Plugin is not feasible. I understand that the Ajax plugin can be used for the same. How can i send the html content to…
sdgd
  • 723
  • 1
  • 17
  • 38
1
vote
0 answers

Should you use InfluxDBClient's close() method?

As mentioned in the API documentation of the InfluxDB Python, the InfluxDBClient has a method close(). Are you supposed to always use it or is it closed automatically?
1
vote
1 answer

How to get variables into a json object?

A really simple noob question. How do I place variables in this json_body variable? The problem is with all the quotation marks. I can't use the .format string method for this as the json_body variable isn't holding a simple string. from influxdb…
Malte
  • 337
  • 1
  • 11
1
vote
1 answer

How do you sample influxdb data at a specified time interval?

I have 'chunks' of data getting stored every 30 seconds. The timestamps on each row of a chunk is the same. The measurements and one of the tags are different. Is there a way to query the data so that I get the data from the last 24 hours but with…
bloodynri
  • 543
  • 1
  • 6
  • 14
1
vote
1 answer

InfluxDBClientError: 400: {"error":"error parsing query: found -06, expected ; at line 1, char 35"}

I am using influxdbClient to query the Influxdb through python. the simple query works well as: from influxdb import InfluxDBClient client = InfluxDBClient(host='192.168.1.104',…
surya rahul
  • 833
  • 2
  • 14
  • 27
1
vote
1 answer

Query working and non working hours average/Percentile utilisation of servers from influxdb over a month

I am using influxdb to store my production servers CPU/MEMORY utilisation. Recently my customer asked whether it is possible to query out working hours and non working hours average utilisation of all the servers over a period of time or monthly.…
1
vote
0 answers

How to send UDP requests via asyncio in python 3

I would like to send UDP messages to my InfluxDB server using asyncio. This is my synchronous code: import socket import requests from logger import get_logger log = get_logger(__name__) class InfluxDB(object): def __init__(self, username,…
vgoklani
  • 10,685
  • 16
  • 63
  • 101
1
vote
0 answers

lost data after restart the influxdb?

I wrote a script to fetch some data from influxdb.It works well,but some day this script report an error: requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)'), IncompleteRead(0 bytes read) and then,I…
R wang
  • 166
  • 12
1
vote
1 answer

queires and advanced operations in influxdb

Recently started working on influxDB, can't find how to add new measurements or make a table of data from separate measurements, like in SQL we have to join table or so. The influxdb docs aren't that clear. I'm currently using the terminal for…
Abhay Nayak
  • 1,069
  • 1
  • 11
  • 25
1
vote
2 answers

What's the maximum number of points I should write to influxdb in a single request?

In influxdb 1.5, the /write path can accept multiple points in a POST request. What is a reasonable maximum payload size for this? 100 point? 1,000? 10,000? More?
thejohnbackes
  • 1,255
  • 11
  • 21
1
vote
0 answers

Time selections on InfluxDB

I have some stock price data in InfluxDB with columns Ticker and Price. For example: Time Ticker Price ------ ------ ------ 12:02 IBM 100.12 12:02 MSFT 50.15 12:03 IBM 100.15 12:04 MSFT 51.00 12:05 AMZN 200.00 I would like to…
gt6989b
  • 4,125
  • 8
  • 46
  • 64
1
vote
4 answers

How to use Python to iterate through influxDB results

How can I iterate through the result set I get returned from influxDB? I get this result by using client = InfluxDBClient(host=influx_host, port=influx_port,database='db') q = client.query("select * from cpu limit 1") ResultSet({'(u'cpu', None)':…
Cheetara
  • 165
  • 1
  • 5
  • 14
1
vote
1 answer

accessing timestamps using python in influx db

I'm connecting to an influx db using python. Using built in dataframe tools I am successfully accessing data and am able to do everything I'd like, accept I can't access the timestamp values. For example: import sys from influxdb import…
1
vote
3 answers

Influxdb write_points throws AttributeError

I am working on a Python program. I am trying to write a json (see below) into influxDB by using influxdb-python using the below code - DBclient = client(host, port, user, password, dbname) influx_data = json.dumps(write_to_influx_json) print…
Rohit Sarkar
  • 293
  • 1
  • 5
  • 15