Questions tagged [flux-influxdb]

Flux is designed to be usable, readable, flexible, composable, testable, contributable, and shareable. Its syntax is largely inspired by 2018’s most popular scripting language, Javascript, and takes a functional approach to data exploration and processing.

The following example illustrates querying data stored from the last hour, filtering by the cpu measurement and the cpu=cpu-total tag, windowing the data in 1 minute intervals, and calculating the average of each window:

from(bucket:"example-bucket")
  |> range(start:-1h)
  |> filter(fn:(r) =>
    r._measurement == "cpu" and
    r.cpu == "cpu-total"
  )
  |> aggregateWindow(every: 1m, fn: mean)
130 questions
0
votes
1 answer

InfluxDB sum last points

I have a measurement of the player counts on multiple game servers, every time a player leaves or joins the server, the server writes a point to influx containing the player count and the server's unique id. What I am trying to do is sum the last…
Marshall Walker
  • 343
  • 1
  • 10
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
1 answer

InfluxDB Adding an Extra Column for Data Visualisation

Good Evening, I have recently started using InfluxDB Cloud but having a lot of issues visualising data, I am wanting on the Y axis to show the Time and then on the Y Axis the Speed(MPH) from a certain range from like 0-80 but I can't seem to be able…
Jake
  • 1
0
votes
2 answers

Send an alert notification from InfluxDb to Microsoft Teams

I am running an influxDb, on my server, and I created below: Notification Check Notification Endpoint (HTTP POST) Notification Rule All above are running successfuly I have also created a webhook connector to Microsoft teams in order for InfluxDb…
0
votes
1 answer

Combine two InfluxDB rows into one - Flux query

Hi I am currently doing this in R but would like to know if there is a way for me to do it in Flux instead: I have a time series that tracks a value and only stores when the signal is turned on and off. The problem is that the nature of the machine…
strittmm
  • 53
  • 1
  • 8
0
votes
1 answer

InfluxDB v2 annotated csv in R

InfluxDB and Flux return query results in annotated CSV format. Im am querying the data from R studio using the InfluxDB v2 API. How do I work with the data I receive in the annotated csv format? Annotated…
strittmm
  • 53
  • 1
  • 8
0
votes
1 answer

httr POST error: "invalid charachter '-' in numeric literal"

I am new to Influx and R and I am trying to query data from InfluxDB 1.8.4 (with Flux enabled) in R Studio. I can't figure out what's wrong with my code: dburl <- "http://localhost:8086/api/v2/query" influxquery <- sprintf( 'from(bucket:…
strittmm
  • 53
  • 1
  • 8
0
votes
1 answer

How to escape strings in Flux (influxdb)?

I want to pass a http.post json through a task but I cannot find docs on how to escape a string and I have quotations inside my strings import "json" import "http" from(bucket: "prod") |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |>…
ditoslav
  • 4,563
  • 10
  • 47
  • 79
0
votes
1 answer

How to create Influxdb alert for deviating from average hourly values?

So I'm trying to find any documentation on more complex Flux queries but after days of searching I'm still lost. I want to be able to calculate average values for each hour of the week and then when new data comes in I want to check if it deviates…
ditoslav
  • 4,563
  • 10
  • 47
  • 79
1 2 3
8
9