Download the PHP package corley/influxdb-sdk without Composer

On this page you can find all versions of the php package corley/influxdb-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package influxdb-sdk

InfluxDB PHP SDK

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version License

Send metrics to InfluxDB and query for any data.

This project support InfluxDB API >= 0.9 - For InfluxDB v0.8 checkout branch 0.3 (no longer supported)

Supported adapters:

Install it

Just use composer

Or add to your composer.json file

Use it

Add new points:

Or use InfluxDB direct messages

Retrieve existing points:

InfluxDB client adapters

Actually we supports two network adapters

Using UDP/IP Adapter

In order to use the UDP/IP adapter your must have PHP compiled with the sockets extension.

Usage

UDP/IP option set have only host and port properties you configure database and retention policies directly in your InfluxDB configuration

Using HTTP Adapters

Actually Guzzle is used as HTTP client library

Mixing readers and writers

Of course you can mix Udp\Ip and Http adapters in order to write data points with UDP/IP protocol but read information using HTTP.

Or use only the HTTP

Query InfluxDB

You can query the time series database using the query method.

The adapter returns the json decoded body of the InfluxDB response, something like:

If you prefere a more simple response than the original one, you can use corley/influxdb-http-handlers that convert, the original InfluxDB response, in a more simple response, something like:

Global tags and retention policy

You can set a set of default tags, that the SDK will add to your metrics:

The SDK mark all point adding those tags.

You can set a default retentionPolicy using

In that way the SDK use that policy instead of default policy.

Proxies and InfluxDB

If you proxy your InfluxDB typically you have a prefix in your endpoints.

Data type management

From InfluxDB version >=0.9.3 integer types are marked with a trailing i. This library supports data types, in particular PHP types are mapped to influxdb in this way by defaults:

And the resulting mapping will be:

PHP InfluxDB
int int64
double float64
boolean boolean
string string

Force data type

If you want to ensure that a type is effectively parsed correctly you can force it directly during the send operation

Query Builder

Interested in a Query Builder?

https://github.com/corley/dbal-influxdb

Thanks to Doctrine DBAL (Abstract Layer) you can use the query builder

Database operations and custom queries

The class InfluxDB\Client does not support any database operation by itself. That means that you don't have any helper function for create new databases, or list actual databases and so on. Thanks to InfluxDB\Manager you can use a preset of queries and create your own personal queries that will run against the Influxdb instance.

Create the manager

The Manager instance is very simple, you have to create it with a client instance.

Attach new queries

The manager allows to attach new queries via an helper method addQuery.

As you can see you have to label your anonymous function and reuse it via the manager.

In order to collect and reuse custom queries you can define query objects:

As you can see valid query command should be callable via the __invoke method and should be also serializable as strings via __toString method

Existing queries

This project comes out with a preset of valid queries:

FAQ

Add sockets support to your PHP

To verify if you have the sockets extension just issue a:

If you don't have the sockets extension, you can proceed in two ways:

Guzzle 4 support

We drop the Guzzle 4 support, but we tested it as working HTTP adapter in up to PHP 7.0 and is stable with this project with version 0.9.3.

If you need Guzzle 4 as HTTP adapter require for 0.9.3 version


All versions of influxdb-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
guzzlehttp/guzzle Version ~4|~5|~6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package corley/influxdb-sdk contains the following files

Loading the files please wait ....