TSDB INFLUXDB A TIME SERIES DATABASE Created by Gianluca Arbezzano / @GianArb
TSDB TIME SERIES DATABASE It is a software system that is optimized for handling time series data, arrays of numbers indexed by time (a datetime or a datetime range)
LEARN STARTUP Eric Ries The Lean Startup: How Today's Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses
TIME SERIES DATA A time series is a sequence of data points, measured typically at successive points in time spaced at uniform time intervals
OTHER POSSIBILITY Google Analytics Amazon CloudWatch ...
INFLUXDB An open-source distributed time series database with no external dependencies
it is written in Golang wget http://s3.amazonaws.com/influxdb/influxdb_latest_amd64.deb sudo dpkg -i influxdb_latest_amd64.deb Docs
WHY? Real time Easy Scalable Http api & Client(php, python, ruby...) Single source
OPEN SOURCE Github
GRAFANA An open source, feature rich metrics dashboard and graph editor for Graphite, InfluxDB & OpenTSDB.
GETTING STARTED curl -X POST -d '[ { "name" : "hd_used", "columns" : ["value", "host", "mount"], "points" : [ [23.2, "serverA", "/mnt"] ] } ]' 'http://localhost:8086/db/mydb/series?u=root&p=root'
MORE POINTS FOR INSERT [ { "name": "log_lines", "columns": ["time", "sequence_number", "line"], "points": [ [1400425947368, 1, "this line is first"], [1400425947368, 2, "and this is second"] ] } ]
IMPLEMENT UDP PROTOCOL [input_plugins.udp] enabled = true port = 4444 database = "search" InfluxDB is down? Your APP works!
BENCHMARK UDP VS TCP CorleyBenchmarksInfluxDBAdapterEvent Method Name Iterations Average Time Ops/second ------------------------ ------------ -------------- ------------- sendDataUsingHttpAdapter: [1,000 ] [0.0026700308323] [374.52751] sendDataUsingUdpAdapter : [1,000 ] [0.0000436344147] [22,917.69026]
QUERY curl 'http://localhost:8086?u=root&p=root&q=select * from log_lines limit 1' [ { "name": "log_lines", "columns": ["time", "sequence_number", "line"], "points": [ [1400425947368, 287780001, "here's some useful log info"] ] } ]
ADMIN PANEL:8083
FEATURES Create database Manage users Query and Graphs
GRAFANA Is an Javascript OpenSource Dashboard Drag and drop panels Click and select region to zoom Bars, Lines, Points Mix lines, bars and points InfluxDB query editor Annotation lines
ANNOTATIONS?! You can mark deploy and monitoring differences between two versions
CORLEY/INFLUXDB-PHP-SDK Another influxdb SDK written in PHP
INSTALL php composer.phar require corley/influxdb-sdk:dev-master
ADAPTER SYSTEM Very flexible UDP Adapter Guzzle Adapter Your implementation..
CREATE CLIENT $options = new InfluxDBOptions(); $adapter = new InfluxDBAdapterUdpAdapter($options); $client = new InfluxDBClient(); $client->setAdapter($adapter);
FACTORY PATTERN $options = [ "adapter" => [ "name" => "InfluxDBAdapterGuzzleAdapter", "options" => [ // guzzle options ], ], "options" => [ "host" => "my.influx.domain.tld", ], "filters" => [ "query" => [ "name" => "InfluxDBFilterColumnsPointsFilter" ], ], ]; $client = InfluxDBClientFactory::create($options);
MARK YOUR EVENT $client->mark("error.404", ["page" => "/a-missing-page"]); $client->mark("app.search", $points, "s");
QUERY $influx->query("select * from mine"); $influx->query("select * from mine", "s"); $client->setFilter(new ColumnsPointsFilter()); $data = $client->query("select * from hd_used");
THE KEY OF MEASURE GitHub - Making MySql Better at GitHub
RICHARD FEYNMAN - THE KEY TO SCIENCE 1. Guess 2. Compute Consequences 3. Compare with experiment/experience "IF IT DISAGREES WITH EXPERIMENT, IT’S WRONG"
FUTURE Star 12 Star this project Use it and help us with your issues & PR

Time series database, InfluxDB & PHP

  • 1.
    TSDB INFLUXDB ATIME SERIES DATABASE Created by Gianluca Arbezzano / @GianArb
  • 2.
    TSDB TIME SERIESDATABASE It is a software system that is optimized for handling time series data, arrays of numbers indexed by time (a datetime or a datetime range)
  • 3.
    LEARN STARTUP EricRies The Lean Startup: How Today's Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses
  • 4.
    TIME SERIES DATA A time series is a sequence of data points, measured typically at successive points in time spaced at uniform time intervals
  • 5.
    OTHER POSSIBILITY GoogleAnalytics Amazon CloudWatch ...
  • 6.
    INFLUXDB An open-sourcedistributed time series database with no external dependencies
  • 7.
    it is writtenin Golang wget http://s3.amazonaws.com/influxdb/influxdb_latest_amd64.deb sudo dpkg -i influxdb_latest_amd64.deb Docs
  • 8.
    WHY? Real time Easy Scalable Http api & Client(php, python, ruby...) Single source
  • 9.
  • 10.
    GRAFANA An opensource, feature rich metrics dashboard and graph editor for Graphite, InfluxDB & OpenTSDB.
  • 11.
    GETTING STARTED curl-X POST -d '[ { "name" : "hd_used", "columns" : ["value", "host", "mount"], "points" : [ [23.2, "serverA", "/mnt"] ] } ]' 'http://localhost:8086/db/mydb/series?u=root&p=root'
  • 12.
    MORE POINTS FORINSERT [ { "name": "log_lines", "columns": ["time", "sequence_number", "line"], "points": [ [1400425947368, 1, "this line is first"], [1400425947368, 2, "and this is second"] ] } ]
  • 13.
    IMPLEMENT UDP PROTOCOL [input_plugins.udp] enabled = true port = 4444 database = "search" InfluxDB is down? Your APP works!
  • 14.
    BENCHMARK UDP VSTCP CorleyBenchmarksInfluxDBAdapterEvent Method Name Iterations Average Time Ops/second ------------------------ ------------ -------------- ------------- sendDataUsingHttpAdapter: [1,000 ] [0.0026700308323] [374.52751] sendDataUsingUdpAdapter : [1,000 ] [0.0000436344147] [22,917.69026]
  • 15.
    QUERY curl 'http://localhost:8086?u=root&p=root&q=select* from log_lines limit 1' [ { "name": "log_lines", "columns": ["time", "sequence_number", "line"], "points": [ [1400425947368, 287780001, "here's some useful log info"] ] } ]
  • 16.
  • 17.
    FEATURES Create database Manage users Query and Graphs
  • 18.
    GRAFANA Is anJavascript OpenSource Dashboard Drag and drop panels Click and select region to zoom Bars, Lines, Points Mix lines, bars and points InfluxDB query editor Annotation lines
  • 19.
    ANNOTATIONS?! You canmark deploy and monitoring differences between two versions
  • 20.
  • 21.
    INSTALL php composer.pharrequire corley/influxdb-sdk:dev-master
  • 22.
    ADAPTER SYSTEM Veryflexible UDP Adapter Guzzle Adapter Your implementation..
  • 23.
    CREATE CLIENT $options= new InfluxDBOptions(); $adapter = new InfluxDBAdapterUdpAdapter($options); $client = new InfluxDBClient(); $client->setAdapter($adapter);
  • 24.
    FACTORY PATTERN $options= [ "adapter" => [ "name" => "InfluxDBAdapterGuzzleAdapter", "options" => [ // guzzle options ], ], "options" => [ "host" => "my.influx.domain.tld", ], "filters" => [ "query" => [ "name" => "InfluxDBFilterColumnsPointsFilter" ], ], ]; $client = InfluxDBClientFactory::create($options);
  • 25.
    MARK YOUR EVENT $client->mark("error.404", ["page" => "/a-missing-page"]); $client->mark("app.search", $points, "s");
  • 26.
    QUERY $influx->query("select *from mine"); $influx->query("select * from mine", "s"); $client->setFilter(new ColumnsPointsFilter()); $data = $client->query("select * from hd_used");
  • 27.
    THE KEY OFMEASURE GitHub - Making MySql Better at GitHub
  • 28.
    RICHARD FEYNMAN -THE KEY TO SCIENCE 1. Guess 2. Compute Consequences 3. Compare with experiment/experience "IF IT DISAGREES WITH EXPERIMENT, IT’S WRONG"
  • 29.
    FUTURE Star 12Star this project Use it and help us with your issues & PR