Kubic:Telemetry

跳转到:导航搜索

openSUSE MicroOS 和 openSUSE Kubic 的遥测解决方案

如果您只有小型集群,并且需要一个快速简单的解决方案来监控它,Prometheus 和 Grafana 等工具通常过于复杂。Clear Linux* 项目提供了一个 遥测解决方案,可以快速检测质量问题。目前有 openSUSE 的移植版本可用,我们正在努力将其集成到不同的 MicroOS 特定工具中。默认情况下,不会将任何数据发送到任何地方,而仅存储在本地。也没有 openSUSE 托管的后端来收集所有数据,必须在本地网络中部署自己的后端服务器。

客户端

客户端的 RPM 包尚未在 Factory 中,但可以在这里找到: https://download.opensuse.org/repositories/home:/kukuk:/telemetric/openSUSE_Tumbleweed/

安装

使用 zypper 添加: zypper ar -f https://download.opensuse.org/repositories/home:/kukuk:/telemetric/openSUSE_Tumbleweed/ telemetrics

安装客户端 RPM: transactional-update pkg install telemetrics-client

重启系统以使二进制文件可见。

配置

如果您想记录到中央服务器,需要调整配置文件。为此,您必须先复制默认配置文件: cp /usr/share/defaults/telemetrics/telemetrics.conf /etc/telemetrics/

通常需要调整以下变量

 server=https://telemetry.example.com/v2/collector
 record_server_delivery_enabled=false
 record_retention_enabled=true

服务器条目需要指向您的本地后端。请务必正确选择 httphttpsrecord_server_delivery_enabled 需要设置为 truerecord_retention_enabled 取决于您是否想同时将数据存储在本地。

出于隐私原因,机器的 ID 将每三天更改一次。为了能够长时间识别一台机器,您必须提供一个静态 ID

 echo "your static ID" > /etc/telemetrics/opt-in-static-machine-id

启用

调整配置后,启用并启动服务

 telemctl start

测试配置: /usr/lib/telemetrics-probes/hprobe 如果一切正常,也为下次启动启用服务

 telemctl enable

后端服务器

没有 Telemetrics 服务器的软件包,您需要下载 deploy.sh 脚本在 openSUSE Tumbleweed 上安装 telemetrics-backend 服务器。需要以下拉取请求: https://github.com/clearlinux/telemetrics-backend/pull/62

运行 deploy.sh -a install -d opensuse -H localhost