amantinetti/laravel-influxdb2
Composer 安装命令:
composer require amantinetti/laravel-influxdb2
包简介
A service made to provide, set up and use the library from influxdata influx client php 2 in Laravel.
README 文档
README
A service made to provide, set up and use the library from influxdata influxdb-client-php in Laravel.
Installing
- Install by composer command:
composer require amantinetti/laravel-influxdb2
- Or add this line to require section of
composer.jsonand execute on your terminal$ composer install
"require": { "amantinetti/laravel-influxdb2": "^0.0.1" }
This package use auto-discover, if using less than version laravel 5.5 you must use below settings
- Add this lines to yours config/app.php (Use only with Laravel version less than 5.5 )
'providers' => [ // ... Amantinetti\InfluxDB\Providers\ServiceProvider::class, ]
'aliases' => [ // ... 'InfluxDB' => Amantinetti\InfluxDB\Facades\InfluxDB::class, ]
- Define env variables to connect to InfluxDB
INFLUXDB_URL=http://localhost:8086 INFLUXDB_TOKEN=my-token INFLUXDB_BUCKET=my-bucket INFLUXDB_ORG=my-org
- Write this into your terminal inside your project
php artisan vendor:publish
Reading Data
<?php // executing a query will yield a resultset object $query_api = InfluxDB::createQueryApi(); $result = $query_api->query('from(bucket:"my-bucket") |> range(start: 1970-01-01T00:00:00.000000001Z) |> last()');
Writing Data
<?php $write_api = InfluxDB::createWriteApi(); $write_api->write('h2o,location=west value=33i 15');
License
This project is licensed under the MIT License
amantinetti/laravel-influxdb2 适用场景与选型建议
amantinetti/laravel-influxdb2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9.3k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 11 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 amantinetti/laravel-influxdb2 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 amantinetti/laravel-influxdb2 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 9.3k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-30