gh05tpl / simple-influxdb-client-bundle
Simple bundle of influxdb client for symfony framework
Installs: 55
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8
- influxdata/influxdb-client-php: ^2.8
- symfony/framework-bundle: >=5.0
This package is not auto-updated.
Last update: 2025-03-02 03:24:08 UTC
README
This bundle is based on influxdata/influxdb-client-php
Installation (until flex isn't added)
composer require gh05tpl/simple-influxdb-client-bundle
- Add bundle in
bundles.php
with this lineGh05tPL\SimpleInfluxDbClientBundle\SimpleInfluxDbClientBundle::class => ['all' => true],
- Add config file under
config/packages/gh05tpl_influxdb_client.yaml
and use config example to populate it
Usage
To inject specific client defined in configuration use camelCase version of the name in argument (e.g. $mySecondClient
) typed with
\InfluxDB2\Client
class and then use it as described in original repo
influxdata/influxdb-client-php
Config file example
gh05tpl_influxdb_client: clients: my_first_client: host: 'http://influx' port: '8086' token: 'TOKEN' organization: 'my-org' bucket: 'my-bucket' precision: 's' timeout: 2 my_second_client: host: 'http://influx' port: '8086' token: 'TOKEN' organization: 'my-org2' bucket: 'my-bucket2' precision: 's' timeout: 2