# categraf
**Repository Path**: Gao06/categraf
## Basic Information
- **Project Name**: categraf
- **Description**: categraf数据采集器 从github导入
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: add-log
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-09-13
- **Last Updated**: 2023-09-13
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## Categraf
[](https://flashcat.cloud/)
[](https://github.com/flashcatcloud/categraf/releases/latest)
[](https://hub.docker.com/r/flashcatcloud/categraf/)
[](https://github.com/flashcatcloud/categraf/stargazers)
[](https://github.com/flashcatcloud/categraf/fork)
[](https://github.com/flashcatcloud/categraf/graphs/contributors)
[](https://github.com/flashcatcloud/categraf/blob/main/LICENSE)
Categraf is one-stop telemetry collector for nightingale / prometheus / m3db / victoriametrics / thanos / influxdb / tdengine.
## Links
- [QuickStart](https://flashcat.cloud/blog/monitor-agent-categraf-introduction/)
- [FAQ](https://www.gitlink.org.cn/flashcat/categraf/wiki/FAQ)
- [Github Releases](https://github.com/flashcatcloud/categraf/releases)
## Build
```shell
# export GO111MODULE=on
# export GOPROXY=https://goproxy.cn
go build
```
## Pack
```shell
tar zcvf categraf.tar.gz categraf conf
```
## Run
```shell
# 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:
```shell
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](https://github.com/flashcatcloud/categraf/blob/main/prometheus/README.md)
## Plugin
plugin list and document: [https://github.com/flashcatcloud/categraf/tree/main/inputs](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.
## Community
