mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Updated docs
This commit is contained in:
@@ -101,8 +101,8 @@ $client = \InfluxDB\ClientFactory::create($options);
|
||||
$client->mark("error.404", ["page" => "/a-missing-page"]);
|
||||
```
|
||||
|
||||
Of course you can always use the DiC or your service manager in
|
||||
order to create a valid client instance.
|
||||
Of course you can always use the DiC or your service manager in order to create
|
||||
a valid client instance.
|
||||
|
||||
### Time Precision write/read queries
|
||||
|
||||
@@ -125,10 +125,11 @@ $influx->query("select * from mine");
|
||||
$influx->query("select * from mine", "s"); // with time_precision
|
||||
```
|
||||
|
||||
You can query the database only if the adapter is queryable (implements `QueryableInterface`),
|
||||
actually `GuzzleAdapter`.
|
||||
You can query the database only if the adapter is queryable (implements
|
||||
`QueryableInterface`), actually `GuzzleAdapter`.
|
||||
|
||||
The adapter returns the json decoded body of the InfluxDB response, something like:
|
||||
The adapter returns the json decoded body of the InfluxDB response, something
|
||||
like:
|
||||
|
||||
```
|
||||
array(1) {
|
||||
@@ -161,9 +162,9 @@ array(1) {
|
||||
}
|
||||
```
|
||||
|
||||
By default data is returned as is. You can add filters in order to
|
||||
change a response as you prefer, by default this library carries a
|
||||
common filter that simplifies the response.
|
||||
By default data is returned as is. You can add filters in order to change a
|
||||
response as you prefer, by default this library carries a common filter that
|
||||
simplifies the response.
|
||||
|
||||
```
|
||||
$client->setFilter(new ColumnsPointsFilter());
|
||||
@@ -171,8 +172,7 @@ $client->setFilter(new ColumnsPointsFilter());
|
||||
$data = $client->query("select * from hd_used");
|
||||
```
|
||||
|
||||
With the "ColumnsPointsFilter" you get a list of dictionaries,
|
||||
something like:
|
||||
With the "ColumnsPointsFilter" you get a list of dictionaries, something like:
|
||||
|
||||
```
|
||||
[
|
||||
@@ -196,9 +196,10 @@ $client->createDatabase("my.name"); // create a new database with name "my.name"
|
||||
$client->deleteDatabase("my.name"); // delete an existing database with name "my.name"
|
||||
```
|
||||
|
||||
Actually only queryable adapters can handle databases (implements the `QueryableInterface`)
|
||||
Actually only queryable adapters can handle databases (implements the
|
||||
`QueryableInterface`)
|
||||
|
||||
## Benchmark
|
||||
## Benchmarks
|
||||
|
||||
### Adapters
|
||||
|
||||
@@ -212,8 +213,7 @@ Corley\Benchmarks\InfluxDB\AdapterEvent
|
||||
sendDataUsingUdpAdapter : [1,000 ] [0.0000436344147] [22,917.69026]
|
||||
```
|
||||
|
||||
|
||||
### Filter
|
||||
### Filters
|
||||
|
||||
Just what append when you apply the `ColumnsPointsFilter`
|
||||
|
||||
@@ -229,3 +229,6 @@ Corley\Benchmarks\InfluxDB\FilterEvent
|
||||
get1000PointFilteredData: [100 ] [0.0074790692329] [133.70648]
|
||||
```
|
||||
|
||||
in order to eliminate the http handshake and bandwidth overhead network
|
||||
operations are completely skipped
|
||||
|
||||
|
||||
Reference in New Issue
Block a user