InfluxDB - Send data to InfluxDB using Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 มิ.ย. 2024
  • 👨‍💻 Join our Discord Community of DevOps Engineers: / discord
    🍺 Buy me a beer: www.buymeacoffee.com/bradmorg
    ☁️ Vultr Hosting - $100 (limited time): www.vultr.com/?ref=8808363-6G
    📁 Code Available here: github.com/bradmorg/influxdb-...
    📘 Chapters:
    0:00 Intro
    0:25 Import influxdb module, setup and select database
    2:45 Setting up a Payload to send to InfluxDB
    6:06 Sending our Payload and selecting data from Influxdb
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Hey thanks for the content! I was the one who asked for it so thank you very much!
    It didnt cross my mind to load all my data into a data structure first, make it look nice and then upload it just once. I was uploading to influx using the "line protocol", one line at a time.

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

    Thanks. I was struggling with instrumentation for Grafana building an exporter for inFluxDB. This makes so much sense.

  • @user-kn6xz8lc6d
    @user-kn6xz8lc6d 10 หลายเดือนก่อน

    What a good video! This guy really teachs well. He goes direct to the point.
    Thanks!

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

    Thank you so much for this tutorial. I was struggling a lot harder with inserting data via python into influxdb than I care to admit >.

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

    Very informative and helpful! Thank you very much!

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

    Damn bro. You taught the whole course in a few minutes. That's pretty awesome content. Love it bro

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

      Thank you! More to come in a week or so :)

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

    Love what you're doing here!

    • @DevOpsJourney
      @DevOpsJourney  3 ปีที่แล้ว

      Thank you for the support Larry. I'm a big fan of your channel!

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

    You made my day.

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

    Hi, helpful video and thanks for it. I have a doubt if I'm having 500+ tickers (live data) continuously coming will this InfluxDB handle better? or is anything better available?

  • @parsbytes
    @parsbytes 4 หลายเดือนก่อน

    nice content bro

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

    Hello, thank you but… what about if you have to load many data (e.g. manual readings of some devices which are not connected to the InfluxDB server)? Should I write all those commands every time?
    I am not an expert of Python, but it looks like not so efficient.

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

      Hello Riccardo. I think the best way would be to make a Python script that takes in the data and sends it to influxdb. Python is very powerful, you would be able to pull in data from a spreadsheet or from a users input and have python insert it into the database for you. It would require some learning of Python to make the script yourself.

  • @danbam9018
    @danbam9018 8 หลายเดือนก่อน

    is this possible if I want to send data using Can bus?

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

    Does this also work with influxdb v2 or just 1.8? And how can I send data within C++?

    • @DevOpsJourney
      @DevOpsJourney  3 ปีที่แล้ว +5

      This is actually for an older version of Influx unfortunatly..
      I will be doing a video on Influx 2.0 soon.

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

    Thank you for this content!
    Unfortunately, when I try to connect with the InfluxDB database, I have this error : influxdb.exceptions.InfluxDBClientError: 401: {"code":"unauthorized","message":"Unauthorized"}
    I checked that the username and the password in the docker-compose.yml file and in the InfluxDBClient object are the same, but I can't figure out why I still have this message.
    Would you have any suggestion to solve this issue ?

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

      same, have you figured it out?

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

      problem is in the docker-compose file. I used influxdb:latest - now influxdb updated to 2.0 so authentication changed.
      I've corrected the docker-compose file on github. I now use image: influxdb:1.8. If you use my latest docker-compose file on github it should fix your problem

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

      I have fixed the docker-compose file. Should work now!

    • @bw7112
      @bw7112 2 ปีที่แล้ว +5

      @@DevOpsJourney will you record another video of Influxdb 2.0?

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

    Hi,InfluxDB 2 has no DB concept anymore but Buckets. How code can be updated to write to bucket and not DB? Thanks in advance

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

      In InfluxDB 2.0, if you log in and click data, it will give you the basics of how to use python, java etc. You can see in this video I quickly go over it. th-cam.com/video/-gF-Jsk85bQ/w-d-xo.html

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

      @@DevOpsJourney So many thanks, I visited the python page but I need to upload a CSV file to influx, the 3 methods send data inline, any idea or piece of code as I am not a python expert

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

    Is it different for InfluxDB 2.0?

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

      yes InfluxDB 2.0 has differences on how you send data. I believe I have a video on it.

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

    Request Tutorial gitlab ci

  • @DevOpsJourney
    @DevOpsJourney  3 ปีที่แล้ว

    If you haven't already, checkout my video on InfluxDB! th-cam.com/video/Vq4cDIdz_M8/w-d-xo.html