d4c8d7e9fd
fix config collapse when instances were written in more than one file… |
||
---|---|---|
.github | ||
agent | ||
api | ||
conf | ||
config | ||
doc | ||
docker | ||
house | ||
inputs | ||
k8s | ||
logs | ||
parser | ||
pkg | ||
prometheus | ||
traces | ||
types | ||
writer | ||
.gitignore | ||
.goreleaser.yaml | ||
LICENSE | ||
Makefile | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go | ||
main_posix.go | ||
main_windows.go |
README.md
Categraf
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
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: 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.