mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Updated docs with filters
This commit is contained in:
@@ -88,6 +88,11 @@ $options = [
|
||||
"options" => [
|
||||
"host" => "my.influx.domain.tld",
|
||||
],
|
||||
"filters" => [
|
||||
"query" => [
|
||||
"name" => "InfluxDB\\Filter\\ColumnsPointsFilter"
|
||||
],
|
||||
],
|
||||
];
|
||||
$client = \InfluxDB\ClientFactory::create($options);
|
||||
|
||||
@@ -154,6 +159,31 @@ 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.
|
||||
|
||||
```
|
||||
$client->setFilter(new ColumnsPointsFilter());
|
||||
|
||||
$data = $client->query("select * from hd_used");
|
||||
```
|
||||
|
||||
With the "ColumnsPointsFilter" you get a list of dictionaries,
|
||||
something like:
|
||||
|
||||
```
|
||||
[
|
||||
"serie_name" => [
|
||||
[
|
||||
"time" => 410545635590,
|
||||
"sequence_number" => 390001,
|
||||
"mark" => "element",
|
||||
],
|
||||
]
|
||||
]
|
||||
```
|
||||
|
||||
## Database operations
|
||||
|
||||
You can create, list or destroy databases using dedicated methods
|
||||
|
||||
Reference in New Issue
Block a user