Difference between revisions of "InfluxDB"

From air
Jump to navigation Jump to search
Line 117: Line 117:
 
==Via l'interface Web==
 
==Via l'interface Web==
 
Depuis l'interface web http://localhost:8083/, Créez une base : mydb
 
Depuis l'interface web http://localhost:8083/, Créez une base : mydb
  +
  +
=Clustering=
  +
avec [[Raft]]
   
 
=Telegraf=
 
=Telegraf=
 
https://github.com/influxdb/telegraf
 
https://github.com/influxdb/telegraf
 
''agent written in Go for collecting metrics from the system it's running on, or from other services, and writing them into InfluxDB. ''
 
''agent written in Go for collecting metrics from the system it's running on, or from other services, and writing them into InfluxDB. ''
 
   
 
=Chronograf=
 
=Chronograf=

Revision as of 10:00, 7 October 2015

Vers la page de la version 0.8 InfluxDB 0.8


http://influxdb.com/

https://github.com/influxdb/influxdb

open-source distributed time series database with no external dependencies.

(metrics, events, and analytics)

developped in Go language

Voir https://speakerdeck.com/pauldix/introducing-influxdb-an-open-source-distributed-time-series-database

Demo sur http://play.influxdb.com/ (source code)

InfluxDB @ AIR

Installation

http://influxdb.com/download/

On Linux (Debian)

# for 64-bit systems
wget http://influxdb.s3.amazonaws.com/influxdb_0.9.3_amd64.deb
sudo dpkg -i influxdb_0.9.3_amd64.deb

On OS X

brew update
brew install influxdb

Démarrage

sudo /etc/init.d/influxdb start

Naviguez sur http://localhost:8083/ username : root & password : root

Pensez à changer ces valeurs dans /usr/local/etc/influxdb.conf quand vous mettez influxdb en production

Le fichier de configuration peut être généré au moyen de :

/opt/influxdb/influxd config > /etc/influxdb/influxdb.generated.conf

Premiers Pas

Via le shell

influx

Créer la base

CREATE DATABASE mydb
SHOW DATABASES
USE mydb


Insérer des points

INSERT cpu,host=serverA,region=us_west value=0.64
INSERT cpu,host=serverA,region=us_east value=0.70
INSERT cpu,host=serverA,region=us_west value=0.70
INSERT cpu,host=serverA,region=us_east value=0.90

INSERT payment,device=mobile,product=Notepad,method=credit billed=33,licenses=3i 1434067467100293230

INSERT stock,symbol=AAPL bid=127.46,ask=127.48

INSERT temperature,machine=unit42,type=assembly external=25,internal=37 1434067467000000000

Consulter la base

show series

SELECT * FROM cpu
SELECT * FROM cpu WHERE value >= 0.7
SELECT * FROM cpu LIMIT 1
SELECT value from cpu WHERE time > now() - 7d
SELECT mean(value) FROM cpu WHERE time > now() - 1h GROUP BY time(10m);

SELECT * FROM temperature

Via l'interface REST

curl -G 'http://localhost:8086/query?pretty=true' --data-rlencode "db=mydb" --data-urlencode "q=SELECT value FROM cpu WHERE region='us_west'"

Requêtes multiples

curl -G 'http://localhost:8086/query?pretty=true' --data-rlencode "db=mydb" --data-urlencode "q=SELECT value FROM cpu WHERE region='us_west';SELECT count(value) FROM cpu WHERE region='us_west'"

Affichage en seconde

curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=mydb" --data-urlencode "epoch=s" --data-urlencode "q=SELECT value FROM cpu WHERE region='us_west'"

Affichage d'un 'chunk' de 20000

curl
 -G 'http://localhost:8086/query' --data-urlencode "db=mydb" --data-urlencode "chunk_size=20000" --data-urlencode "q=SELECT * FROM cpu"


Via l'interface Web

Depuis l'interface web http://localhost:8083/, Créez une base : mydb

Clustering

avec Raft

Telegraf

https://github.com/influxdb/telegraf agent written in Go for collecting metrics from the system it's running on, or from other services, and writing them into InfluxDB.

Chronograf

Chronograf is a single binary web application that you can deploy behind your firewall to do ad hoc exploration of your time series data in InfluxDB.

Installation

wget https://s3.amazonaws.com/get.influxdb.org/chronograf/chronograf_0.1.0_amd64.deb
sudo dpkg -i chronograf_0.1.0_amd64.deb

sudo service chronograf start