当前位置:网站首页>开源一款监控数据采集器,啥都能监控
开源一款监控数据采集器,啥都能监控
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/
边栏推荐
- Zero foundation self-study SQL course | having clause
- Zero foundation self-study SQL course | sub query
- Leetcode -- wrong set
- 正则匹配手机号
- 12、 Demonstration of all function realization effects
- Inspiration from reading CVPR 2022 target detection paper
- Common emoticons
- How to import MDF and LDF files into MySQL workbench
- tp5 使用post接收数组数据时报variable type error: array错误的解决方法
- CF566E-Restoring Map【bitset】
猜你喜欢

Netrca: an effective network fault cause localization

Lu Qi: I am most optimistic about these four major technology trends

Solution: the word of jmeter5.5 on the win11 lower interface is very small

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

深入解析 Apache BookKeeper 系列:第三篇——读取原理

【LeetCode】541. Reverse string II

实战剖析:app扫码登陆实现原理(app+网页端详细逻辑)附源码

深入了解 border

【gdb调试工具】| 如何在多线程、多进程以及正在运行的程序下调试
![[redis implements seckill business ①] seckill process overview | basic business implementation](/img/a3/9a50e83ece43904a3a622dcdb05b3c.png)
[redis implements seckill business ①] seckill process overview | basic business implementation
随机推荐
ThinkPHP 5.0 模型关联详解
实战剖析:app扫码登陆实现原理(app+网页端详细逻辑)附源码
Ebanb B1 Bracelet brush firmware abnormal interrupt handling
The border problem after the focus of input
【ES6闯关】Promise堪比原生的自定义封装(万字)
Framework tool class obtained by chance for self use
Vidéo courte recommandée chaque semaine: Soyez sérieux en parlant de "métaunivers"
P6117-[JOI 2019 Final]コイン集め【贪心】
嵌入式 | 硬件转软件的几条建议
linux(centos7.9)安装部署mysql-cluster 7.6
In depth analysis of Apache bookkeeper series: Part 3 - reading principle
Transplantation of xuantie e906 -- fanwai 0: Construction of xuantie c906 simulation environment
Leetcode -- linked list
[Niuke] length of the last word of HJ1 string
深入解析 Apache BookKeeper 系列:第三篇——读取原理
2021-05-20computed and watch applications and differences
【Redis实现秒杀业务①】秒杀流程概述|基本业务实现
Time Series Data Augmentation for Deep Learning: A Survey 之论文阅读
Yolox backbone -- implementation of cspparknet
软件系统依赖关系分析