categraf/README.md

126 lines
2.9 KiB
Markdown
Raw Normal View History

2022-05-16 11:58:50 +08:00
# Categraf
2022-04-14 15:18:49 +08:00
2022-06-24 17:53:45 +08:00
Categraf is a monitoring agent for nightingale / prometheus / m3db / victoriametrics / thanos / influxdb / tdengine.
2022-04-14 15:18:49 +08:00
2022-06-24 17:53:45 +08:00
## Links
2022-05-31 06:33:13 +08:00
2022-06-24 17:53:45 +08:00
- [QuickStart](https://www.gitlink.org.cn/flashcat/categraf/wiki/QuickStart)
- [FAQ](https://www.gitlink.org.cn/flashcat/categraf/wiki/FAQ)
- [Github Releases](https://github.com/flashcatcloud/categraf/releases)
- [Gitlink Releases](https://www.gitlink.org.cn/flashcat/categraf/releases)
2022-05-30 13:43:58 +08:00
2022-05-16 11:58:50 +08:00
## Build
2022-04-14 15:18:49 +08:00
```shell
2022-05-16 11:58:50 +08:00
# export GO111MODULE=on
# export GOPROXY=https://goproxy.cn
2022-04-14 15:18:49 +08:00
go build
```
2022-06-13 19:52:13 +08:00
2022-06-24 17:53:45 +08:00
## Pack
2022-06-13 19:52:13 +08:00
```shell
2022-06-24 17:53:45 +08:00
tar zcvf categraf.tar.gz categraf conf
2022-06-13 19:52:13 +08:00
```
2022-04-14 15:18:49 +08:00
2022-06-24 17:53:45 +08:00
## Run
2022-05-16 11:58:50 +08:00
```shell
2022-06-24 17:53:45 +08:00
# test mode: just print metrics to stdout
2022-05-16 11:58:50 +08:00
./categraf --test
2022-06-24 17:53:45 +08:00
# test system and mem plugins
./categraf --test --inputs system:mem
# print usage message
2022-05-16 11:58:50 +08:00
./categraf --help
2022-06-24 17:53:45 +08:00
# 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 &
2022-05-16 11:58:50 +08:00
```
2022-06-24 17:53:45 +08:00
## Deploy categraf as daemonset
2022-06-28 15:49:10 +08:00
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:
2022-04-14 15:18:49 +08:00
```shell
2022-06-28 15:49:10 +08:00
kubectl apply -n monitoring -f ks8/daemonset.yaml
kubectl apply -n monitoring -f ks8/sidecar.yaml
2022-04-14 15:18:49 +08:00
```
2022-06-28 15:49:10 +08:00
notice: k8s/sidecar.yaml is a demo, replace mock with your own image.
2022-04-17 11:05:12 +08:00
2022-06-24 17:53:45 +08:00
## Plugin
Click on the links to see the README of each plugin.
2022-04-17 11:05:12 +08:00
2022-06-14 19:42:35 +08:00
- [x] [system](inputs/system)
- [x] [kernel](inputs/kernel)
- [x] [kernel_vmstat](inputs/kernel_vmstat)
- [x] [linux_sysctl_fs](inputs/linux_sysctl_fs)
- [x] [cpu](inputs/cpu)
- [x] [mem](inputs/mem)
- [x] [net](inputs/net)
- [x] [netstat](inputs/netstat)
- [x] [disk](inputs/disk)
- [x] [diskio](inputs/diskio)
- [x] [conntrack](inputs/conntrack)
2022-06-14 19:42:35 +08:00
- [x] [ntp](inputs/ntp)
- [x] [processes](inputs/processes)
- [x] [exec](inputs/exec)
- [x] [ping](inputs/ping)
- [x] [http_response](inputs/http_response)
- [x] [net_response](inputs/net_response)
- [x] [procstat](inputs/procstat)
- [x] [mysql](inputs/mysql)
- [x] [redis](inputs/redis)
- [x] [oracle](inputs/oracle)
- [x] [rabbitmq](inputs/rabbitmq)
- [x] [prometheus](inputs/prometheus)
- [x] [tomcat](inputs/tomcat)
- [x] [nvidia_smi](inputs/nvidia_smi)
- [x] [nginx_upstream_check](inputs/nginx_upstream_check)
- [x] [kubernetes(read metrics from kubelet api)](inputs/kubernetes)
2022-06-20 14:37:03 +08:00
- [x] [kube_state_metrics](inputs/kube_state_metrics)
2022-06-21 10:55:49 +08:00
- [x] [nginx_vts](inputs/nginx_vts)
2022-05-02 15:35:01 +08:00
- [ ] mongodb
- [ ] rocketmq
- [ ] activemq
- [ ] kafka
- [ ] elasticsearch
2022-06-01 11:58:12 +08:00
- [x] windows
2022-05-02 15:35:01 +08:00
- [ ] mssql
- [ ] iis
- [ ] weblogic
- [ ] was
- [ ] hadoop
- [ ] ad
- [x] [zookeeper](inputs/zookeeper)
2022-05-02 15:35:01 +08:00
- [ ] statsd
- [ ] snmp
2022-06-14 19:42:35 +08:00
- [x] [switch_legacy](inputs/switch_legacy)
2022-05-02 15:35:01 +08:00
- [ ] ipmi
- [ ] smartctl
- [ ] logging
- [ ] trace
2022-05-16 11:58:50 +08:00
2022-05-30 13:43:58 +08:00
2022-05-16 11:58:50 +08:00
## Thanks
Categraf is developed on the basis of Telegraf and Exporters. Thanks to the great open source community.
2022-06-25 14:13:34 +08:00
## Community
![](doc/laqun.jpeg)