guobingithub / categraf

one-stop telemetry collector for nightingale; Categraf 是一个监控采集 Agent,类似 Telegraf、Grafana-Agent、Datadog-Agent,希望对所有常见监控对象提供监控数据采集能力,采用 All-in-one 的设计,不但支持指标采集,也希望支持日志和调用链路的数据采集。来自快猫研发团队,和 Open-Falcon、Nightingale 的研发是一拨人。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Categraf

categraf, one-stop telemetry collector

Powered By Flashcat Release Docker pulls Starts Forks Contributors "License"

Categraf is one-stop telemetry collector for nightingale / prometheus / m3db / victoriametrics / thanos / influxdb / tdengine.

Links

Build

# export GO111MODULE=on
# export GOPROXY=https://goproxy.cn
go build

Pack

tar zcvf categraf.tar.gz categraf conf

for mac user, use gnu-tar instead

use system tar tool will cause err 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

brew install gnu-tar
gtar zcvf categraf.tar.gz categraf conf

Run

# 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 &

Deploy categraf as daemonset, deployment or sidecar

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:

kubectl apply -n monitoring -f k8s/daemonset.yaml # collect metrics, metrics/cadvisor of node
kubectl apply -n monitoring -f k8s/sidecar.yaml # collect service metrics
kubectl apply -n monitoring -f k8s/deployment.yaml #collect apiserver coredns etc

Notice: k8s/sidecar.yaml is a demo, replace mock with your own image of service.

Scrape like prometheus

see detail here

Plugin

plugin list and document: https://github.com/flashcatcloud/categraf/tree/main/inputs

Thanks

Categraf is developed on the basis of Telegraf, Exporters and the OpenTelemetry. Thanks to the great open source community.

About

one-stop telemetry collector for nightingale; Categraf 是一个监控采集 Agent,类似 Telegraf、Grafana-Agent、Datadog-Agent,希望对所有常见监控对象提供监控数据采集能力,采用 All-in-one 的设计,不但支持指标采集,也希望支持日志和调用链路的数据采集。来自快猫研发团队,和 Open-Falcon、Nightingale 的研发是一拨人。

License:MIT License


Languages

Language:Go 98.8%Language:Yacc 0.6%Language:Shell 0.2%Language:HTML 0.2%Language:Smarty 0.1%Language:Makefile 0.1%Language:Batchfile 0.0%Language:Dockerfile 0.0%