F! failed to init config: failed to load configs of dir: ./conf err:toml: line 1: files cannot contain NULL bytes; probably using UTF-16; TOML files must be UTF-8
运行
# test mode: just print metrics to stdout
./categraf --test
# test system and mem plugins
./categraf --test --inputs system:mem
# print usage message
./categraf --help
# run
./categraf
# run with specified config directory
./categraf --configs /path/to/conf-directory
# only enable system and mem plugins
./categraf --inputs system:mem
# use nohup to start categraf
nohup ./categraf &> stdout.log &
edit k8s/daemonset.yaml, replace NSERVER_SERVICE_WITH_PORT with service ip:port of nserver in your cluster, replace CATEGRAF_NAMESPACE with namespace value, then run:
Categraf
Categraf 是一款 All-in-One 的开源的 telemetry 数据采集器,支持指标、日志采集;支持 Tracing 数据的收集;支持物理机、虚拟机、交换机、容器、K8s、多种中间件/数据库的数据采集,支持混合云架构、云原生架构、多云架构。汇聚领域最佳实践,开箱即用。
功能和特点
文档
从源代码编译
Note: 对于mac os x 用户,请使用 gun-tar 工具打包
否则会出现以下报错:
F! failed to init config: failed to load configs of dir: ./conf err:toml: line 1: files cannot contain NULL bytes; probably using UTF-16; TOML files must be UTF-8
运行
部署在K8s
Categraf 可以以 daemonset, deployment 或者 sidecar 的形式运行在K8s中。
edit k8s/daemonset.yaml, replace NSERVER_SERVICE_WITH_PORT with service ip:port of nserver in your cluster, replace CATEGRAF_NAMESPACE with namespace value, then run:
Notice: k8s/sidecar.yaml is a demo, replace mock with your own image of service.
使用Categraf无缝代替Prometheus抓取数据
see detail here
插件
plugin list and document: https://github.com/flashcatcloud/categraf/tree/main/inputs
致谢
Categraf is developed on the basis of Telegraf, Exporters and the OpenTelemetry. Thanks to the great open source community.
加入我们的微信群组