2017 © Pedro PelĂĄez
 

library influx-php

Simple client for InfluxDB

image

chromabits/influx-php

Simple client for InfluxDB

  • Friday, January 16, 2015
  • by etcinit
  • Repository
  • 1 Watchers
  • 1 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 32 Forks
  • 0 Open issues
  • 5 Versions
  • 30 % Grown

The README.md

influx-php Build Status

Simple PHP client for InfluxDB, an open-source, distributed, time series, events, and metrics database., (*1)

This is a fork of crodas/InfluxPHP, (*2)

Installation

The easiest way is to install it via composer, (*3)

composer require chromabits/influx-php

Usage

You need to create a client object., (*4)

use Chromabits\InfluxClient\Client;

$client = new Client(
   "localhost" /*default*/,
   8086 /* default */,
   "root" /* by default */,
   "root" /* by default */
);

The first time you should create an database., (*5)

$db = $client->createDatabase("foobar");
$db->createUser("foo", "bar"); // <-- create user/password

Create data is very simple., (*6)

$db = $client->foobar;
$db->insert("some label", ['foobar' => 'bar']); // single input
$db->insert("some label", [
    ['foobar' => 'bar'],
    ['foobar' => 'foo'],
]); // multiple input, this is better :-)

Now you can get the database object and start querying., (*7)

$db = $client->foobar;
// OR
$db = $client->getDatabase("foobar");

foreach ($db->query("SELECT * FROM foo;") as $row) {
    var_dump($row, $row->time);
}

The Versions

16/01 2015

0.2.1

0.2.1.0

Simple client for InfluxDB

  Sources   Download

BSD-4-Clause

The Requires

 

The Development Requires

by César D. Rodas
by Eduardo Trujillo

16/01 2015

dev-master

9999999-dev

Simple client for InfluxDB

  Sources   Download

BSD-4-Clause

The Requires

 

The Development Requires

by César D. Rodas
by Eduardo Trujillo

16/01 2015

0.2.0

0.2.0.0

Simple client for InfluxDB

  Sources   Download

BSD-4-Clause

The Requires

 

The Development Requires

by César D. Rodas
by Eduardo Trujillo

16/01 2015

dev-https

dev-https

Simple client for InfluxDB

  Sources   Download

BSD-4-Clause

by César D. Rodas

29/09 2014

v0.1.1

0.1.1.0

Simple client for InfluxDB

  Sources   Download

BSD-4-Clause

by César D. Rodas