Download the PHP package imiphp/imi-influxdb without Composer

On this page you can find all versions of the php package imiphp/imi-influxdb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package imi-influxdb

imi-influxdb

Latest Version Php Version Swoole Version imi License

介绍

此项目是 imi 框架的 InfluxDB 组件。

自动引入 yurunsoft/influxdb-orm,可以直接使用该 ORM 功能。

支持的功能:

正在开发中,随时可能修改,请勿用于生产环境!

安装

composer require imiphp/imi-influxdb:~2.1.0

使用说明

InfluxDB 连接管理

配置连接

config.php

获取客户端对象

获取数据库对象

使用数据库对象

详细用法请参考:https://github.com/influxdata/influxdb-php

InfluxDB ORM

详细用法请参考:https://github.com/Yurunsoft/influxdb-orm

SQL 查询

写入

服务指标监控

仅支持 Swoole、Workerman。

支持 TDengine InfluxDB 协议写入。

安装所需组件

composer require imiphp/imi-meter:~2.1.0

配置

配置监控指标:

@app.beans

TDengine InfluxDB 所需修改的配置:

使用

注解
@Counted

类名:\Imi\Meter\Annotation\Counted

计数统计,适合只累加,不减少的统计数据类型。

例如:访问次数统计。

参数名 类型 默认值 描述
name string imi.counted 指标名称
recordFailuresOnly false bool 是否只在抛出异常时记录
tags array [] 标签,键值数组
description string 描述
options array [] 额外参数,每个驱动不同
@Gauged

类名:\Imi\Meter\Annotation\Gauged

适合数字有上下波动的统计。

例如:CPU 占用率统计。

参数名 类型 默认值 描述
name string imi.counted 指标名称
recordFailuresOnly false bool 是否只在抛出异常时记录
tags array [] 标签,键值数组
description string 描述
value string\|float {returnValue} 写入的值;{returnValue} 表示方法返回值;{returnValue.xxx} 表示方法返回值的属性值;{params.0} 表示方法参数值;{params.0.xxx} 表示方法参数值的属性值;也可以是固定的 float
operation int \Imi\Meter\Enum\GaugeOperation::SET 操作类型。设置GaugeOperation::SET;增加GaugeOperation::INCREMENT;减少GaugeOperation::DECREMENT
options array [] 额外参数,每个驱动不同
@Timed

类名:\Imi\Meter\Annotation\Timed

耗时统计。

例如:方法执行耗时

参数名 类型 默认值 描述
name string imi.counted 指标名称
tags array [] 标签,键值数组
description string 描述
baseTimeUnit int \Imi\Meter\Enum\TimeUnit::NANO_SECOND 基础时间单位,默认纳秒,可以使用 \Imi\Meter\Enum\TimeUnit::XXX 常量设置。
options array [] 额外参数,每个驱动不同
@Histogram

类名:\Imi\Meter\Annotation\Histogram

柱状图,一般人用不懂,如无特殊需求可以无视。

参数名 类型 默认值 描述
name string imi.counted 指标名称
tags array [] 标签,键值数组
description string 描述
buckets array [] 桶,例如:[100, 500, 1000]
baseTimeUnit int \Imi\Meter\Enum\TimeUnit::NANO_SECOND 基础时间单位,默认纳秒,可以使用 \Imi\Meter\Enum\TimeUnit::XXX 常量设置。
value string\|float {returnValue} 写入的值;{returnValue} 表示方法返回值;{returnValue.xxx} 表示方法返回值的属性值;{params.0} 表示方法参数值;{params.0.xxx} 表示方法参数值的属性值;也可以是固定的 float
options array [] 额外参数,每个驱动不同
@Summary

类名:\Imi\Meter\Annotation\Summary

采样点分位图,一般人用不懂,如无特殊需求可以无视。

参数名 类型 默认值 描述
name string imi.counted 指标名称
tags array [] 标签,键值数组
description string 描述
percentile array [] 百分位数,例如:[0.01, 0.5, 0.99]
baseTimeUnit int \Imi\Meter\Enum\TimeUnit::NANO_SECOND 基础时间单位,默认纳秒,可以使用 \Imi\Meter\Enum\TimeUnit::XXX 常量设置。
value string\|float {returnValue} 写入的值;{returnValue} 表示方法返回值;{returnValue.xxx} 表示方法返回值的属性值;{params.0} 表示方法参数值;{params.0.xxx} 表示方法参数值的属性值;也可以是固定的 float
options array [] 额外参数,每个驱动不同

代码示例:

手动操作

免费技术支持

QQ群:17916227 点击加群,如有问题会有人解答和修复。

运行环境

版权信息

imi-influxdb 遵循 MulanPSL-2.0 开源协议发布,并提供免费使用。

捐赠

开源不求盈利,多少都是心意,生活不易,随缘随缘……


All versions of imi-influxdb with dependencies

PHP Build Version
Package Version
Requires yurunsoft/influxdb-orm Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package imiphp/imi-influxdb contains the following files

Loading the files please wait ....