Flux query language and Influxdb basics

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024

ความคิดเห็น • 42

  • @someone_there
    @someone_there 2 ปีที่แล้ว +1

    I am glad I found your video, cause now I understood a bit more about the influxdb queries, however I think there is still a lot of hesitation/mistakes that are slightly degradating the comprehension of the video, that's a point for improvement. Thanks a lot for your time and explanations! 👍

  • @jackbenimble999
    @jackbenimble999 2 ปีที่แล้ว +1

    Thanks! the SQL comparisons are especially helpful.

  • @miketancsa
    @miketancsa 2 ปีที่แล้ว +1

    Great intro video! I have been doing a deep dive into influx DB 2.x, telegraf, grafana etc and it took me a while to get my bearings coming from just a SQL background. One note about the video, the image of you narrating obscures the bottom right corner of the panel which is important to see :)

  • @StephenRerri-Bekibele
    @StephenRerri-Bekibele 3 หลายเดือนก่อน

    Great video! thank you for the insightful knowledge into how the query builder generates code for you if you are not sure how to write the flux equivalent.

  • @tomekem3473
    @tomekem3473 2 ปีที่แล้ว +1

    Great content. I'm going to switch from 1.x to 2.x and this is very useful for me. Keep going :)

  • @archilizer2946
    @archilizer2946 2 ปีที่แล้ว

    Finally, some good content for novice users. Garbage training materials from influxdb, very frustrating start... Thank you kindly, Sir.

  • @BGazzah
    @BGazzah 2 ปีที่แล้ว +1

    Another great vid - I am building up a new NUC to hold mainly node-red, influx and grafana. I have an older v1.x influx with several years worth of data that I may try and transfer. So good timing on your part :)

  • @pratyush__agarwal
    @pratyush__agarwal ปีที่แล้ว +1

    Nicely explained, great video 👍

  • @shashiranjan7451
    @shashiranjan7451 5 หลายเดือนก่อน

    Very nice video. Keep it up!!

  • @jafarekrami
    @jafarekrami 2 ปีที่แล้ว

    Good Job! please continue and do something with influx 1.x also.

    • @csongorvarga
      @csongorvarga  2 ปีที่แล้ว +1

      Sorry, it takes a lot of time to get my head around 2.x, I have no intention to go back to a version which is not supported any more.

  • @unknown3158
    @unknown3158 2 ปีที่แล้ว +3

    I was looking forward to this video but the background music is too loud and annoying, had to stop two minutes in.

  • @aaaliasx
    @aaaliasx 2 ปีที่แล้ว +1

    Thanks for a great tutorial Csongor Varga,! Is your bucket mydb available anywhere? Thought it would help a lot if I can have the same data setup locally when I wath the different chapters in the video

    • @csongorvarga
      @csongorvarga  2 ปีที่แล้ว

      Not, but I am not sure how I could export it... never done that before

  • @gopalr5894
    @gopalr5894 2 ปีที่แล้ว +1

    Dear Varga. How can we create measurement in influxdb 2.1 OSS for my Bucket? Because your video state that already created measurement like sensor mydb bucket.

    • @csongorvarga
      @csongorvarga  2 ปีที่แล้ว

      You just start creating new data and the measurement gets created automatically. It is not like a table that you need to define manually.

    • @gopalr5894
      @gopalr5894 2 ปีที่แล้ว

      ​@@csongorvarga Thanks Varga. Still I am not sure about data creation. Where can I create data like field, tag, measurement in influxdb 2.1 UI for my bucket? As of now I can create bucket only. After create bucket what to do?

    • @csongorvarga
      @csongorvarga  2 ปีที่แล้ว

      @@gopalr5894 Influx is a structure less database. You load the data and the measurements, tag and fields will get created. There is an import feature in the UI to load data in CSV or line protocol format, otherwise you just push data form an external application like Node-Red.

    • @gopalr5894
      @gopalr5894 2 ปีที่แล้ว

      @@csongorvarga Thanks for your Clarification. I want to push the data from Node-Red to Influxdb using Docker Images. But it won't work at all. Could you tell me using docker (Node-Red to Influxdb 2.1 OSS) to push the data.

    • @csongorvarga
      @csongorvarga  2 ปีที่แล้ว

      @@gopalr5894 I don't know. I never worked with docker. If Node-Red and Influx are in different dockers it may not work.

  • @MatSmithLondon
    @MatSmithLondon ปีที่แล้ว

    This was really useful, especially the bit about deleting Influx data. I'm using Node-RED to send data from multiple current clamp sensors (Emporia, data collected in HA). I have a function node that just takes the MQTT topic and converts it into an object key, with the number as the value. However for some reason, one of the sensors gives an error: failure writing points to database: partial write: field type conflict: input field "empty_10_1min" on measurement "emporia_power" is type float, already exists as type string dropped=1". So obviously some time in the past it has written a string, and so that measurement type is a string. I thought I could just delete all the data in that field by running the delete command, but that doesn't seem to work. Is there a way to fully delete a field itself (not just the data within the field)?

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      Yes, I had similar issue in the past, and I had to delete data as well. You can delete data for an entire measurement or entire field. So it really depends how to save the data.

    • @MatSmithLondon
      @MatSmithLondon ปีที่แล้ว

      @@csongorvarga Any idea what the command to do that might be? I have tried this: "sudo influx delete --bucket nodered --start 2013-03-01T00:00:00Z --stop 2023-08-24T00:00:00Z --predicate '_measurement="emporia_power" AND _field="empty_10_1min"' --org CHR". The command doesn't produce an error. But when I go into Influx data explorer (web interface) and refresh the page, then click into the measurement, (also need to change aggregate function to "last" and set visualisation type to "table") that field still exists with loads of data. All the data values are "unknown" but there are a lot of them...

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      @@MatSmithLondon I am going through my notes and I have this as an example: influx delete --bucket aggregates --start 2005-03-01T00:00:00Z --stop 2022-03-01T00:00:00Z --predicate '_measurement="example-measurement" AND exampleTag="exampleTagValue"' . And based on this, I used an example this: influx delete --bucket nodered --start 2005-03-01T00:00:00Z --stop 2023-03-01T00:00:00Z --predicate '_measurement="sensors" AND device="house"' . You need to put the filters after predicate into single quotes. If I can in your example your predicate ends with single quote+double quote, but I think it should be double quote+single quote to correctly close the parameter after predicate. But this has worked for me. And I would remove any aggregate function from the query so see each record in the database.

  • @niyantazamindar4019
    @niyantazamindar4019 2 ปีที่แล้ว

    Hello, I have a query:
    If the values in left most column "table MEAN" represent mean of the window, how can mean be 0 (15:08 timestamp in video). Also, if I don't have any aggregate function in place, the column becomes "table _RESULT" and has int values (0, 3) [my local db]. What do they represent?

  • @nor505
    @nor505 2 ปีที่แล้ว

    Hello Csongor! Nice video as always from you! In one of your earlier video I saw you installed esphome without home assistant on one of your iot device. My question is whether you could send datas from esphome to influxdb. I am not sure, but as far as I know influxdb plugin for esphome is not existent. You can disable the standard api of esphome and change to mqtt and then you can use a mqtt->influxdb connector to send data from esphome to influxdb. However, I think it is not am elegant way. Do you have any experience about that. Thanks for your answer.

    • @csongorvarga
      @csongorvarga  2 ปีที่แล้ว

      If I remember correctly, I tried looking into it. To be honest since I have Node-Red I do everything via Node-Red. But it is possible to set up Telegraf to subscribe to MQTT topics and push the data to influx. Maybe this post can help: github.com/influxdata/telegraf/blob/master/plugins/inputs/mqtt_consumer/README.md

  • @gabrielarispe7703
    @gabrielarispe7703 2 ปีที่แล้ว +1

    hi men good video, an question is there a way to get the number of rows returned by a query?

    • @csongorvarga
      @csongorvarga  2 ปีที่แล้ว

      Sure, you can use the count() function.

  • @RaviKumar-i6i9h
    @RaviKumar-i6i9h ปีที่แล้ว

    Hi, I just want to know how you are writing the data into the influxdb. If you can share the that file, it will be very helpful

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว +1

      I post data from Node-Red, and I use the line protocol to inject the data. I am showing this is all my other videos.

  • @satishkamma8493
    @satishkamma8493 ปีที่แล้ว

    In influxdb is it possible to find which exact query,index,measurement using high memory or cpu in percentage wise. Is there any document along with commands/syntax for checking these. can you help on this

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      That is a good question. Sorry I have no idea, I probably have to research this.

  • @azrinbaharin9630
    @azrinbaharin9630 2 ปีที่แล้ว

    hi .. may i know how to do query database for influx for speceifi date and time . let say query from 1jan2022 8am to 2jan2022 8am

    • @csongorvarga
      @csongorvarga  2 ปีที่แล้ว

      Just use the range function and you can just specify the start and end date directly. For example: |> range(start: 2018-05-22T23:30:00Z, stop: 2018-05-23T00:00:00Z)

  • @manpt123
    @manpt123 ปีที่แล้ว

    So you did not show how to create a measurement!

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว +1

      You don't have to create it. Once you start injecting data, it will get generated. And if you misspell it, that would be a new measurement.

    • @manpt123
      @manpt123 ปีที่แล้ว +1

      @@csongorvarga sorry but it took sometime for me to understand how influxdb really works.

  • @samdonche4607
    @samdonche4607 2 ปีที่แล้ว +1

    69th like :D
    Thanks for the info!

  • @kzm1934
    @kzm1934 ปีที่แล้ว +1

    Informative but the background music needs to go!

    • @csongorvarga
      @csongorvarga  ปีที่แล้ว

      No more background music. You will not hear on my new videos.

  • @peterretep2091
    @peterretep2091 ปีที่แล้ว

    after year is useless, this explorer is totally different