当前位置:网站首页>开源一款监控数据采集器,啥都能监控
开源一款监控数据采集器,啥都能监控
2022-06-24 08:11:00 【InfoQ】
简介
- github:https://github.com/flashcatcloud/categraf
- gitlink:https://www.gitlink.org.cn/flashcat/categraf
对比
- 支持 remote_write 写入协议,支持将数据写入 promethues、M3DB、VictoriaMetrics、InfluxDB
- 指标数据只采集数值,不采集字符串,标签维持稳态结构
- 采用 all-in-one 的设计,所有的采集工作用一个 agent 搞定,未来也可以把日志和 trace 的采集纳入 agent
- 纯 Go 代码编写,静态编译依赖少,容易分发,易于安装
- 尽可能落地最佳实践,不需要采集的数据无需采集,针对可能会对时序库造成高基数的问题在采集侧做出处理
- 常用的采集器,不但提供采集能力,还要整理出监控大盘和告警规则,用户可以直接导入使用
- 未来希望作为快猫 SaaS 产品的重要组成部分,引入快猫团队的研发力量持续迭代,当然,希望更多的公司、更多人研发人员参与共建,做成国内最开放、最好用的采集器
安装
go build测试
conf/input.mysql/mysql.toml./categraf --test --inputs mysqlconf/input.mysql/mysql.tomlkill -HUP `pidof categraf`
./categraf --help插件说明
配置说明
[global]
# 启动的时候是否在stdout中打印配置内容
print_configs = false
# 机器名,作为本机的唯一标识,会为时序数据自动附加一个 agent_hostname=$hostname 的标签
# hostname 配置如果为空,自动取本机的机器名
# hostname 配置如果不为空,就使用用户配置的内容作为hostname
# 用户配置的hostname字符串中,可以包含变量,目前支持两个变量,
# $hostname 和 $ip,如果字符串中出现这两个变量,就会自动替换
# $hostname 自动替换为本机机器名,$ip 自动替换为本机IP
# 建议大家使用 --test 做一下测试,看看输出的内容是否符合预期
hostname = ""
# 是否忽略主机名的标签,如果设置为true,时序数据中就不会自动附加agent_hostname=$hostname 的标签
omit_hostname = false
# 时序数据的时间戳使用ms还是s,默认是ms,是因为remote write协议使用ms作为时间戳的单位
precision = "ms"
# 全局采集频率,15秒采集一次
interval = 15
# 全局附加标签,一行一个,这些写的标签会自动附到时序数据上
# [global.labels]
# region = "shanghai"
# env = "localhost"
# 发给后端的时序数据,会先被扔到 categraf 内存队列里,每个采集插件一个队列
# chan_size 定义了队列最大长度
# batch 是每次从队列中取多少条,发送给后端backend
[writer_opt]
# default: 2000
batch = 2000
# channel(as queue) size
chan_size = 10000
# 后端backend配置,在toml中 [[]] 表示数组,所以可以配置多个writer
# 每个writer可以有不同的url,不同的basic auth信息
[[writers]]
url = "http://127.0.0.1:19000/prometheus/v1/write"
# Basic auth username
basic_auth_user = ""
# Basic auth password
basic_auth_pass = ""
# timeout settings, unit: ms
timeout = 5000
dial_timeout = 2500
max_idle_conns_per_host = 100
interval
interval = 60
interval = "60s"
interval = "1m"
- 秒:s
- 分钟:m
- 小时:h
instances
[[]][[instances]]
targets = [
"www.baidu.com",
"127.0.0.1",
"10.4.5.6",
"10.4.5.7"
]
[[instances]]
targets = [
"www.baidu.com",
"127.0.0.1"
]
[[instances]]
targets = [
"10.4.5.6",
"10.4.5.7"
]
interval_times
labels
工作计划
- [x] system
- [x] kernel
- [x] kernel_vmstat
- [x] linux_sysctl_fs
- [x] cpu
- [x] mem
- [x] net
- [x] netstat
- [x] disk
- [x] diskio
- [x] ntp
- [x] processes
- [x] exec
- [x] ping
- [x] http_response
- [x] net_response
- [x] procstat
- [x] mysql
- [x] redis
- [x] oracle
- [x] rabbitmq
- [x] prometheus
- [x] tomcat
- [x] nvidia_smi
[[email protected] categraf]# find inputs -name "*.json"
inputs/redis/alerts.json
inputs/redis/dashboard.json
inputs/system/dashboard.json
inputs/system/alerts-linux.json
inputs/oracle/dashboard.json
inputs/ping/alerts.json
inputs/ping/dashboard.json
inputs/ntp/alerts.json
inputs/procstat/alerts.json
inputs/mysql/alerts.json
inputs/mysql/dashboard.json
inputs/tomcat/dashboard.json
inputs/rabbitmq/dashboard.json
inputs/http_response/alerts.json
inputs/http_response/dashboard.json
inputs/net_response/alerts.json
inputs/net_response/dashboard.json
- [ ] k8s solution
- [ ] nginx vts
- [ ] mongodb
- [ ] rocketmq
- [ ] activemq
- [ ] kafka
- [ ] elasticsearch
- [ ] prometheus discovery
- [ ] windows
- [ ] mssql
- [ ] iis
- [ ] weblogic
- [ ] was
- [ ] hadoop
- [ ] ad
- [ ] zookeeper
- [ ] statsd
- [ ] snmp
- [ ] ipmi
- [ ] smartctl
- [ ] logging
- [ ] trace
更多信息
附录
- 作者:龙渊秦五,网络ID:UlricQin,个人主页:https://ulricqin.github.io
- 夜莺:一款云原生监控系统,国产开源,隶属中国计算机学会开源发展委员会,项目主站:https://n9e.github.io/
边栏推荐
- Remote connection of raspberry pie without display by VNC viewer
- Linux MySQL installation
- 牛客网 实现简单计算器功能
- [use picgo+ Tencent cloud object to store cos as a map bed]
- Project deployment related
- Learning Tai Chi Maker - esp8226 (XIII) OTA
- Alibaba Senior Software Testing Engineer recommends testers to learn -- Introduction to security testing
- MySQL - SQL statement
- Linux (centos7.9) installation and deployment of MySQL Cluster 7.6
- Cmake命令之target_compile_options
猜你喜欢

Recommendation - Secret of curiosity: how many dancing angels can stand on the tip of a needle?

深入了解 border

Squid proxy application

十二、所有功能实现效果演示

学习太极创客 — ESP8226 (十二)ESP8266 多任务处理

CF566E-Restoring Map【bitset】

Netrca: an effective network fault cause localization

L01_ How is an SQL query executed?

【ES6闯关】Promise堪比原生的自定义封装(万字)

4275. Dijkstra sequence
随机推荐
Unable to change the virtual machine power status and report an error solution
[redis realize Secondary killing Business ①] Overview of Secondary killing Process | Basic Business Realization
正则匹配手机号
tp5 使用post接收数组数据时报variable type error: array错误的解决方法
NETRCA: AN EFFECTIVE NETWORK FAULT CAUSE LOCALIZATION之论文阅读
The border problem after the focus of input
Rpiplay implementation of raspberry pie airplay projector
Target detection series fast r-cnn
[ES6 breakthrough] promise is comparable to native custom encapsulation (10000 words)
深入了解 border
Go language project development practice directory
牛客网 实现简单计算器功能
Easyexcel single sheet and multi sheet writing
【bug】@JsonFormat 使用时出现日期少一天的问题
Niuke network realizes simple calculator function
牛客网 十进制整数转十六进制字符串
Applet wx show
[e325: attention] VIM editing error
Cmake命令之target_compile_options
Microblog writing - flow chart - sequence chart - Gantt chart - Mermaid flow chart - good results