Coder Social home page Coder Social logo

influxdb-tests's Introduction

General

Influx is a time series database sporting a SQL style interface and query language.

Instead of tables we use measurements. Every measurement contains tag sets (mandatory, indexed) the tuple of which forms a series. I.e, INSERT info,host=bob,location=eu and INSERT info,host=bob,location=uk forms two series (bob,eu) (bob,uk). Every measurement also contains field sets, the (potentially NULL / empty) data for that measurement. All fields have to have time.

Examples

Select a database

USE node_health;

Insert a measurement with one field

INSERT machine_state,host=b1,location=uk cpu_use=7.5;

Select a specific host from a measurement

SELECT * FROM machine_state WHERE host = 'b1';

Select mean CPU usage for a given host

SELECT mean("cpu_use") FROM machine_state WHERE host='b1';

Only the last 5 minutes

SELECT mean("cpu_use") FROM machine_state WHERE host='b1' GROUP BY time(5m) LIMIT 1;

Retention Policy

Retention policies help data stop piling up. Data is clustered into shards (Logical blocks of data clustered based on time). Data retention policies apply to shards, not inserts. Once a shard falls outside of its retention policy, all data in it goes bye bye.

Python Documentation

https://influxdb-python.readthedocs.io/en/latest/api-documentation.html?highlight=create_retention_policy#influxdb.InfluxDBClient.drop_retention_policy

influxdb-tests's People

Contributors

jawline avatar

Watchers

 avatar  avatar  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.