Giter Site home page Giter Site logo

influxdb_python_example's Introduction

InfluxDB Python Example

  • Support on Python3.X

Install requirement

pip install -r requirement.txt

Setup InfluxDB on Ubuntu OS.

Setup

sh ./setup.sh

InfluxDB shell version: 1.1.1 (if this text is visible on your screen, setup will be done!)

Create Users.

Step1 : Enable authentication

  • The configuration file is located in /etc/influxdb/influxdb.conf.
  • Edit this file.
  • In the [http]section of the InfluxDB configuration file (influxdb.conf), uncomment the auth-enabled option and set it to true, as shown here:
  [http]  
  # Determines whether HTTP endpoint is enabled.
  # enabled = true

  # The bind address used by the HTTP service.
  # bind-address = ":8086"

  # Determines whether HTTP authentication is enabled.
  auth-enabled = true #

Step2 : Restart InfluxDB Service

sudo systemctl restart influxdb

Step3 : Create a admin user

curl -XPOST "http://localhost:8086/query" --data-urlencode "q=CREATE USER admin WITH PASSWORD 'admin' WITH ALL PRIVILEGES"
  • localhost : with the IP or hostname of your InfluxDB OSS instance or one of your InfluxEnterprise data nodes

  • admin : with your own username

  • admin : with your own password (note that the password requires single quotes)

  • If this text {"results":[{"statement_id":0}]} show on screen, setup done !!!

Remote to Influxdb server

influx -host 'host' -port 'port' -username 'username' -password 'password'

Reference

[InfluxDB Python Examples]!(https://influxdb-python.readthedocs.io/en/latest/examples.html)
[Managing InfluxDB users]!(https://docs.influxdata.com/chronograf/v1.7/administration/managing-influxdb-users/)

influxdb_python_example's People

Contributors

rinleit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.