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

How does Influxdb sort and draw the line by default?

I have a simple query for fetching some data like: from(bucket: "almon") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["_measurement"] == "binary") |> filter(fn: (r) => r["_field"] == "duration_mili") |>…
ditoslav
  • 4,563
  • 10
  • 47
  • 79
0
votes
0 answers

Flux InfluxDB query not working correctly

I'm using InfluxDB and telegraf to have a dashboard. InfluxDB v2.4.0 (git: de247bab08) build_date: 2022-08-18T19:41:15Z Telegraf 1.23.4 (git: HEAD 5b48f5da) My goal is to create a table with "firmware_version" for each "MCU". telegraf input is an…
0
votes
1 answer

Access InfluxDB 2 through Traefik via subdomain

I've installed Traefik and InfluxDB on docker, and am trying to configure Traefik to act as a reverse proxy for all InfluxDB requests via a subdomain e.g. https://influxdb.mydomain.com. The InfluxDB labels I have are: - traefik.enable=true -…
Jerry
  • 1,127
  • 2
  • 17
  • 35
0
votes
1 answer

Dates getting modified to1970-01-01T00:00:01.659452061Z when writing it to InfluxDb using the InfluxDb php client

I am using PHP Client for InfluxDB - https://github.com/influxdata/influxdb-client-php I am inserting points in my measurement along with current timestamp. For the timestamp, I am using as follows - $time = new…
0
votes
1 answer

Get Influxdb V2 token only in CLI after upgrading from version 1x to 2x

Upgraded influxDb from v1.8.10 to v2.3.0+SNAPSHOT.090f681737 with below command (https://docs.influxdata.com/influxdb/v2.3/upgrade/v1-to-v2/automatic-upgrade/) influxd upgrade --username='admin' --password='adminpass1234' --org='test'…
life quality
  • 63
  • 1
  • 10
0
votes
1 answer

Influxdb2 Merge one measurement into another using flux

I set up influxdb2 to collect data into a measurement "meas0". Now I imported historic data using the line protocol, unfortunately I did a mistake with the target measurement and it went into a second series "meas1". The structure and names…
0
votes
2 answers

Influxdb2 flux's today() function using wrong timezone

This is my query: from(bucket: "power_monitor") |> range(start: today()) |> aggregateWindow(every: 1h, fn: mean, createEmpty: false) |> keep(columns: ["_measurement", "_value", "_time"]) |> increase() |> last() It tracks the amount of energy used…
jpx
  • 123
  • 2
  • 9
0
votes
2 answers

Influxdb2 How to Use windowPeriod in Arithmetic

I am trying to calculate my energy cost with datapoints published to my influxdb. I need to utilize windowPeriod in order to go back far enough in time. I am currently taking a sum of my energy usage and trying to do arithmetic on it, which if I use…
David Weber
  • 354
  • 1
  • 12
0
votes
1 answer

Insight into heavy or currently-running queries on Influx v2.x

In my Influx v2.x setup, I have a process that is running frequent periodic queries that eat up a lot of resources. I want to identify the query that's executed, which may be coming from several consumers/apps. For example, in Influx v1.x you are…
Juliën
  • 9,047
  • 7
  • 49
  • 80
0
votes
1 answer

how to send metrics to influx oss2 using jolokia in telegraf config?

after running teltelegraf -debug with jolokia config [[inputs.jolokia2_agent]] urls = ["http://:8080/jolokia-war-unsecured-1.6.2/"] [[inputs.jolokia2_agent.metric]] name = "jr" mbean = "java.lang:type=Runtime" paths =…
0
votes
1 answer

it is possible to create a default retention policy before mapping bucket in influx v2

I have updated influx to version 2. However, I still want to support v1. I create a bucket and then map the bucket. This also works, but the retention policy is always null although I set it in the request. Is it possible to create a retention…
OlKo
  • 23
  • 3
0
votes
1 answer

Creating Variable with Multiple Tags in InfluxDB2

How to create a Variable with multiple tags in Flux? import "influxdata/influxdb/schema" schema.measurementTagValues( bucket: "AUTOMATIONDB", measurement: "${MEASUREMENT}", tag: "${RUNID}", tag: "CATEGORY". ) The above query gives…
0
votes
1 answer

InfluxDB v2.0 running in docker - ERR: received status code 401 from server

I'm trying to run some experiments with InfluxDB in my local machine but for some reason, auth is not working (or I'm not being able to make it work). I create a docker network running: docker network create --driver bridge…
bert
  • 372
  • 4
  • 13
0
votes
1 answer

Influxdb 2 - how to get schema of a bucket?

How can i get a schema / list of existing fields, tags and measurements in particular bucket? I want to achieve this with using InfluxDB API or influxdb-client-js package in my JS app. Can it be done with proper query? Are there other options?…
szylkret
  • 1
  • 1
0
votes
1 answer

Conditionally assign Flux variable - syntax error

I'm trying to conditionally assign a value to the variable START as part of a Flux query: WINDOW = 1d START = if WINDOW == 1d then today() else 2022-01-01 This results in the following error: unsupported binary expression duration == duration What…