Go to file
Ulric Qin 93d20d3f85 Merge branch 'main' of github.com:flashcatcloud/categraf 2023-05-18 18:23:59 +08:00
.github update workflow for arppacket 2023-02-22 16:43:47 +08:00
agent add smart plugin (#504) 2023-05-17 19:27:37 +08:00
api disable pushgateway in test mode 2023-04-23 14:48:38 +08:00
conf add smart plugin (#504) 2023-05-17 19:27:37 +08:00
config give a default setting for ibex.meta_dir 2023-04-27 15:07:38 +08:00
doc code refactor 2023-02-09 15:59:12 +08:00
docker return error if snmpget no info for oid 2023-02-24 11:28:52 +08:00
heartbeat update memory used percent for heartbeat 2023-04-25 17:20:49 +08:00
ibex opt: code refactor (#295) 2022-12-13 16:28:30 +08:00
inputs add up(version) metric for categraf self (#505) 2023-05-18 15:18:56 +08:00
k8s use volume for prometheus wal 2023-01-16 14:36:27 +08:00
logs reformat import packages (#492) 2023-05-06 11:09:58 +08:00
parser cadvisor plugin (#491) 2023-05-06 11:03:28 +08:00
pkg delete redundant snakecase (#498) 2023-05-08 19:14:54 +08:00
prometheus feat: agent module define & compile prometheus alternative 2022-11-29 16:25:04 +08:00
scripts scripts directory for win_run.bat 2023-03-20 14:10:29 +08:00
traces reformat code before release 2023-04-19 17:03:03 +08:00
types fix that emit_metric_timestamp not work 2023-02-15 20:23:37 +08:00
writer fix: writer nil pointer err (#297) 2022-12-15 12:40:48 +08:00
.gitignore ignore meta dir 2022-12-28 18:30:40 +08:00
.goreleaser.yaml return error if snmpget no info for oid 2023-02-24 11:28:52 +08:00
LICENSE add LICENSE 2022-05-16 11:58:50 +08:00
Makefile fix: writer nil pointer err (#297) 2022-12-15 12:40:48 +08:00
README.md add flashduty link to readme 2023-05-04 19:44:39 +08:00
go.mod Bump github.com/docker/distribution (#502) 2023-05-13 18:24:20 +08:00
go.sum Bump github.com/docker/distribution (#502) 2023-05-13 18:24:20 +08:00
main.go pprof for windows 2023-03-13 17:09:48 +08:00
main_posix.go pprof for windows 2023-03-13 17:09:48 +08:00
main_windows.go pprof for windows 2023-03-13 17:09:48 +08:00

README.md

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.

It is recommended that you use Nightingale as the backend observability tools, and at the same time use FlashDuty as the OnCall system to realize alarm aggregation convergence, claiming, upgrading, scheduling, and coordination, so that the alarm can be reached efficiently and ensure that the alarm processing is not missed, so that every piece echoed.

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.

Join wechat groups