Questions tagged [influxdb-2]

More information here https://v2.docs.influxdata.com/v2.0/. Version 2 uses a new query language called Flux and it is also reactive in nature.

289 questions
0
votes
1 answer

Flux: How to get the last record for each value

Ok this have to be something easy, but I can not find out. Y have the following table, obtained with flux: Ok, I am monitoring Jira, and as you see, in the column "event_type" I have the creation and the following jiras updates. The target here is…
0
votes
2 answers

Zsh bad substitution error when installing Influxdb2.0

I am following the installation instructions from this article but I get a bad substitution error from zsh when executing this command: export DISTRIB_ID=$(lsb_release -si); export DISTRIB_CODENAME=$(lsb_release -sc) echo "deb…
KZiovas
  • 3,491
  • 3
  • 26
  • 47
0
votes
1 answer

Influxdb client query returns empty list even though there is a data

query_api = self.client.query_api() query = f"""from(bucket: "{self.bucket_name}") |> range(start: -60d) |> filter(fn: (r) => r._tag == "{tag}" ) |> yield(name: "name")""" result = query_api.query(org = self.organization_name, query =…
kyo
  • 164
  • 14
0
votes
1 answer

Flux: InfluxDB conversion of a table from Float to Integer

Using InfluxQL with this query, one could convert a table from Float to Integer: SELECT value::integer INTO temp FROM measurement; DROP MEASUREMENT measurement; SELECT value::integer INTO measurement FROM temp; DROP MEASUREMENT temp; How can the…
Stefan
  • 21
  • 1
  • 5
0
votes
1 answer

HTTP post request?param=PARAM vs --data-urlencode

i am just querying my InfluxDB and i made it work, but i never did web so i am not so experienced with http protocol. I need to do curl request. This one works fine: curl -X POST http://localhost:8086/api/v2/query?orgID=12345678 --header…
Jan Janáček
  • 109
  • 1
  • 9
0
votes
1 answer

How to write data on influxDB cloud with api?

I have problem with writing data to influxDB cloud using Postman. I could't find my data in my bucket. How to write data on influxDB cloud with api?postman
0
votes
1 answer

getting {"code":"unauthorized","message":"unauthorized access"} after using "query" http api for InfluxDB 2.0

I am trying to contact influxdb running on kubernetes. I am new on influxdb and I have just started using it. I used the query http API in the following way: curl "http://pod_ip_address/query?q=show+databases" , but the response is…
C1ngh10
  • 13
  • 1
  • 7
0
votes
4 answers

Python InfluxDB2 - write_api.write(...) How to check for success?

I need to write historic data into InfluxDB (I'm using Python, which is not a must in this case, so I maybe willing to accept non-Python solutions). I set up the write API like this write_api = client.write_api(write_options=ASYNCHRONOUS) The Data…
Chris
  • 834
  • 1
  • 10
  • 23
0
votes
2 answers

Using regex in scraping value from json in ansible task

I've a task in ansible where I've to extract value of token from a json object, which is as follows: { "token.stdout_lines": [ "{", "\t\"id\": \"08320829d85c7000\",", "\t\"description\": \"\",", "\t\"token\":…
Mamoona A
  • 3
  • 1
0
votes
1 answer

InfluxDB Flux query last record in each group

I have a measurement for the populations of different cities. I can get the last record one by one for each city but I would like to do that in one query. I don't know how to get that done because this is basically my first flux query. I tried the…
Unplug
  • 709
  • 10
  • 27
0
votes
0 answers

How to use `JOIN` to filter record?

My time series data is stored in InfluxDB and SQL DB. The influxdb only stores a numeric key plus timestamp & value. All related info regarding the numeric key is stored in SQL DB. InfluxDBb datetime - timestamp cnlnum - tag, string val - value,…
Ben
  • 1,133
  • 1
  • 15
  • 30
0
votes
0 answers

How does influxDBv1.8 use the golang API to determine whether a database exists?

I want to use Golang API to write data to Influxdb, but if a database does not exist, it cannot be written. So, how should I use the InfluxDB1.8 Golang API to determine whether the database exists? If it does not exist, how can I use the API to…
張三瘋
  • 1
  • 2
0
votes
1 answer

FLUX Language - how to store last value to use for multiplying a resultset?

I have a dashboard where I am viewing the last 24 Hours of data from my Ethereum mining equipment. I am storing: ETH Price and Miner Balance. I have the following code to bring out the data, but I am multiplying by a constant of 1925.25 currently…
Andrew
  • 437
  • 7
  • 18
0
votes
5 answers

InfluxDB2.0 How to calculate daily value over bigger timeframe?

I'm migrating my InfluxDB1.8 version to InfluxDB2.0 I'm using a influxDB2.0 database and use grafana to display results. What I insert as data are the results of my P1 meter, altough the results are total values, I would like to calculate and…
Wim Origin
  • 43
  • 5
0
votes
1 answer

From Curl to Postman (Dual Authorization Header?)

I am currently attempting to reproduce what I have done via Curl to write data into my influxDB 2.0 Server with Postman Example: curl -XPOST "https://randomwebsite.com/api/v2/write?org=myORG&bucket=myTestBucket" -u user:pasword --header…