diff --git a/README.md b/README.md index b3edf0d..2a9a68b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A minimal service provider to set up and use InfluxDB SDK in Laravel 5 ```js "require": { // ... - "pdffiller/laravel-influx-provider": "^1.2" + "pdffiller/laravel-influx-provider": "^1.6" } ``` - Add these lines to `config/app.php` @@ -33,6 +33,9 @@ LARAVEL_INFLUX_PROVIDER_PASSWORD=some_password LARAVEL_INFLUX_PROVIDER_HOST=host LARAVEL_INFLUX_PROVIDER_PORT=8086 LARAVEL_INFLUX_PROVIDER_DATABASE=database_name +LARAVEL_INFLUX_PROVIDER_VERIFY_SSL=false +LARAVEL_INFLUX_PROVIDER_TIMEOUT=0 +LARAVEL_INFLUX_PROVIDER_CONNECT_TIMEOUT=0 ``` ### How to use diff --git a/composer.json b/composer.json index f4aa532..6d4d862 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "php": ">=5.6", "illuminate/log": "5.2.*|5.3.*|5.4.*", "illuminate/support": "5.2.*|5.3.*|5.4.*", - "influxdb/influxdb-php": "^1.4", + "influxdb/influxdb-php": "1.14.*", "monolog/monolog": "^1.19" }, "require-dev": { diff --git a/src/InfluxDBServiceProvider.php b/src/InfluxDBServiceProvider.php index 04286f5..578d1e7 100644 --- a/src/InfluxDBServiceProvider.php +++ b/src/InfluxDBServiceProvider.php @@ -48,7 +48,10 @@ public function register() config('influxdb.host'), config('influxdb.port'), '' //config('influxdb.database') - ), config('influxdb.timeout') + ), + config('influxdb.timeout'), + (config('influxdb.verify_ssl') === 'true'), + config('influxdb.connect_timeout') ); } catch (ClientException $e) { // die silently diff --git a/src/config/InfluxDB.php b/src/config/InfluxDB.php index 903cbac..2c4f918 100644 --- a/src/config/InfluxDB.php +++ b/src/config/InfluxDB.php @@ -38,8 +38,18 @@ */ 'log_message_lines_limit' => env('LARAVEL_INFLUX_PROVIDER_LOG_MESSAGE_LINES_LIMIT', 5), + /** + * Verify SSL + */ + 'verify_ssl' => env('LARAVEL_INFLUX_PROVIDER_VERIFY_SSL', 'false'), + /** * Timeout */ 'timeout' => env('LARAVEL_INFLUX_PROVIDER_TIMEOUT', 0), + + /** + * Connect Timeout + */ + 'connect_timeout' => env('LARAVEL_INFLUX_PROVIDER_CONNECT_TIMEOUT', 0), ];