当前位置: 首页 > news >正文

用户手册:遥测服务之推送至 TDengine

创建TelemetryService Yaml 文件

apiVersion: shifu.edgenesis.io/v1alpha1
kind: TelemetryService
metadata:name: push-endpoint-1namespace: devices
spec:telemetrySeriveEndpoint: http://telemetryservice.shifu-service.svc.cluster.localserviceSettings:SQLSetting:serverAddress: 192.168.14.163:6041secret: my-secretdbName: shifudbTable: testTable2dbtype: TDengine
  • telemetrySeriveEndpoint是telemetryService的端点地址
  • serverAddress表示数据库地址
  • username表示你的数据库用户名
  • secret表示存储你的数据库用户名与密码的Secret名字
  • dbName表示数据库名
  • dbTable表示数据库表(table)名
  • dbtype表示数据库类型

创建Secret

以上面的secret中内容为名创建Secret,在usernamepassword域中分别填写数据库用户名与密码。

kubectl create secret generic my-secret --from-literal=username=your_username --from-literal=password=your_password -n devices

备注

如果你有多个遥测服务,你可以把它们写在一个文件里,用---进行分割。

编辑Configmap Yaml文件

# configmap.yaml
data:telemetries: |telemetries:device_health1:properties:instruction: statuspushSettings:telemetryCollectionService: push-endpoint-1 # Edit it to the name same with TelemetryService's name

然后编辑Configmap.yaml文件,确保telemetryCollectionService的值与你在上一步创建的遥测服务的名称相同。

再次部署deviceShifu

然后你需要再次部署deviceShifu ,这样TelemetryService就会将采集到的数据推送到TDengine中。

例子

下面是一个例子,帮助你更好地了解如何使用它。

https://github.com/Edgenesis/shifu/tree/main/examples/tdengineTelemetryService/deployment

本文由边无际授权发布

http://www.lryc.cn/news/25682.html

相关文章:

  • 软件测试的主要工作内容是什么
  • 【云原生kubernetes】k8s中job与cronjob使用详解
  • js-cookie的使用
  • c++11 关键字 override 使用
  • 从16K跳槽到20K,最后算下来年薪却还降了,我笑了····
  • 线性表 链表表示
  • 面试题JavaScript篇(二)
  • 项目管理工具dhtmlxGantt甘特图入门教程(十五):从MS项目导入/导出(下)
  • 2023 年 6 大智能合约语言
  • 家用洗地机哪款最好用?全球洗地机十大品牌
  • 【2223sW2】LOG1
  • Spring Cloud配置application.yml与bootstrap.yml区别及多profile配置 | Spring Cloud 6
  • springboot通过aop实现全局日志(是否自定义注解都可以)
  • k8s面试题-进阶
  • 预览版Edge申请微软new Bing失败解决方案
  • Spring中Bean生命周期及循环依赖
  • 【3.1】MySQL锁、动态规划、Redis缓存,过期删除与淘汰策略
  • Python+Yolov5跌倒检测 摔倒检测 人物目标行为 人体特征识别
  • 计算机底层:储存器的性能指标(CPU和内存等硬件的性能以及 对比标准)
  • 操作留痕功能实现与探讨
  • 深入浅出消息队列MSMQ
  • Maven多模块开发
  • QT之OpenGL帧缓冲
  • $ 6 :选择、循环
  • 【项目设计】高并发内存池 (四)[pagecache实现]
  • 玩转qsort——“C”
  • 【干货】又是一年跳槽季!Nginx 10道核心面试题及解析
  • 【线程安全的HashMap有哪些,CurrentHashMap底层是怎么实现线程安全的】
  • C语言-结构体【详解】
  • 浏览器输入url到页面渲染完成经历了哪些步骤