鲲鹏社区首页
中文
注册
我要评分
文档获取效率
文档正确性
内容完整性
文档易理解
在线提单
论坛求助

RPM验证

配置InfluxDB

前提条件:InfluxDB已经安装并初始化成功。InfluxDB安装及初始化请参考《InfluxDB 安装指南》。

  1. 在InfluxDB中创建一个名为kapasts的Bucket。-r 9h表示数据的保留时间为9小时。
    1
    influx bucket create -n kapasts -r 9h
    

    查看Bucket。

    1
    influx bucket list
    

    删除Bucket。

    1
    influx bucket delete --name kapasts
    
  2. 创建用于kapacitor连接的用户。ID请根据实际情况修改。
    influx v1 auth create --username kapa --password 123456 --write-bucket ID --read-bucket ID

    查看用户。

    1
    influx v1 auth list
    

    删除用户。

    1
    influx v1 auth delete --username kapa
    
  3. 创建用户kapacitor连接的DBRP。ID请根据实际情况修改。
    1
    influx v1 dbrp create --bucket-id ID --db kapadb --rp rpv2 --default
    

    查看DBRP。

    1
    ./influx v1 dbrp list
    

    删除DBRP。

    1
    ./influx v1 dbrp delete --id ID
    

配置kapacitor

前提条件:kapacitor已经安装成功但未启动。

  1. 修改kapacitor配置文件,修改后的内容详见以下截图。其中urls为influxdb服务的IP地址和端口,usernamepasswordinflux v1 auth create命令中的用户名和密码,disable-subscriptions修改为truesubscriptions-mode修改为cluster
    1
    vi /etc/kapacitor/kapacitor.conf
    

  2. 关闭kapacitor服务。PID请根据实际情况修改。
    ps -ef | grep kapacitord
    kill -9 PID
  3. 启动kapacitor服务。
    1
    nohup kapacitord &
    

验证kapacitor基本功能

  1. 查询kapacitor整体运行状态。
    1
    kapacitor stats general
    

  2. 查看kapacitor当前正在执行的写操作。
    1
    kapacitor stats ingress
    

  3. 查询数据库信息。
    1
    kapacitor list tasks