Telegraf+Influxdb+Chronograf+Kapacitor主机性能监控告警

简介: 一.简述 通过TICK(Telegraf+Influxdb+Chronograf+Kapacitor)进行主机性能监控告警,职责描述如下: Telegraf的职能是数据采集,用于主机性能数据,包括主机CPU、内存、IO、进程状态、服务状态等 Influxdb的职能是时序数据库,用于存储Teleg.

一.简述

通过TICK(Telegraf+Influxdb+Chronograf+Kapacitor)进行主机性能监控告警,职责描述如下:

  1. Telegraf的职能是数据采集,用于主机性能数据,包括主机CPU、内存、IO、进程状态、服务状态等
  2. Influxdb的职能是时序数据库,用于存储Telegraf采集来的数据
  3. Chronograf的职能是数据可视化,用于将Influxdb数据库的性能数据时序展示
  4. Kapacitor的职能是规则告警,用于配置告警规则将Influxdb数据库查询触发规则的数据进行告警

其中,时序数据库可使用刚开源的TDEngine,可视化可以使用Grafana替代使用

组合职能

组合架构

二.安装试用

所有组件将以Windows版做测试试用

Ⅰ).TICK下载

下载地址

Telegraf Influxdb Chronograf Kapacitor
Linux版 telegraf-1.11.4 infuxdb-1.7.7 chronograf-1.7.12 telegraf-1.11.4
Windows版 telegraf-1.11.4 [infuxdb-1.7.7] chronograf-1.7.12 telegraf-1.11.4

Grafana下载地址

Ⅱ).TICK安装

1).解压

2).配置

a).telegraf.conf

 ## Logging configuration:
  ## Run telegraf with debug log messages.
  debug = false
  ## Run telegraf in quiet mode (error log messages only).
  quiet = false
  ## Specify the log file name. The empty string means to log to stderr.
  logfile = "D:/tick/log/telegraf.log"

b).influxdb.conf

[meta]
  # Where the metadata/raft database is stored
  # dir = "/var/lib/influxdb/meta"
  dir = "D:/tick/influxdb-1.7.7-1/meta"

[data]
  # The directory where the TSM storage engine stores TSM files.
  # dir = "/var/lib/influxdb/data"
  dir = "D:/tick/influxdb-1.7.7-1/data"

  # The directory where the TSM storage engine stores WAL files.
  #wal-dir = "/var/lib/influxdb/wal"
  wal-dir = "D:/tick/influxdb-1.7.7-1/wal"

[logging]
  # Determines which log encoder to use for logs. Available options
  # are auto, logfmt, and json. auto will use a more a more user-friendly
  # output format if the output terminal is a TTY, but the format is not as
  # easily machine-readable. When the output is a non-TTY, auto will use
  # logfmt.
  # format = "auto"
  format = "auto"

  # Determines which level of logs will be emitted. The available levels
  # are error, warn, info, and debug. Logs that are equal to or above the
  # specified level will be emitted.
  # level = "info"
  level = "info"

c).kapacitor.conf

data_dir =  "D:/tick/kapacitor-1.5.3-1"

[logging]
    # Destination for logs
    # Can be a path to a file or 'STDOUT', 'STDERR'.
    # file = "/var/log/kapacitor/kapacitor.log"
    file = "D:/tick/kapacitor-1.5.3-1/kapacitor.log"

    # Logging level can be one of:
    # DEBUG, INFO, ERROR
    # HTTP logging can be disabled in the [http] config section.
    level = "INFO"

[load]
  # Enable/Disable the service for loading tasks/templates/handlers
  # from a directory
  enabled = true
  # Directory where task/template/handler files are set
  # dir = "/etc/kapacitor/load"
  dir = "D:/tick/kapacitor-1.5.3-1/load"


[replay]
  # Where to store replay files, aka recordings.
  # dir = "/var/lib/kapacitor/replay"
  dir = "D:/tick/kapacitor-1.5.3-1/replay"

[task]
  # Where to store the tasks database
  # DEPRECATED: This option is not needed for new installations.
  # It is only used to determine the location of the task.db file
  # for migrating to the new `storage` service.
  # dir = "/var/lib/kapacitor/tasks"
  dir = "D:/tick/kapacitor-1.5.3-1/tasks"

  # How often to snapshot running task state.
  snapshot-interval = "60s"

[storage]
  # Where to store the Kapacitor boltdb database
  # boltdb = "/var/lib/kapacitor/kapacitor.db"
  boltdb = "D:/tick/kapacitor-1.5.3-1/kapacitor.db"

d).custom.ini

[paths]
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
# ;data = /var/lib/grafana
;data = D:/tick/grafana-6.3.2

# Temporary files in `data` directory older than given duration will be removed
;temp_data_lifetime = 24h

# Directory where grafana can store logs
# ;logs = /var/log/grafana
;logs = D:/tick/grafana-6.3.2/log

# Directory where grafana will automatically scan and look for plugins
# ;plugins = /var/lib/grafana/plugins
;plugins = D:/tick/grafana-6.3.2/plugins

# folder that contains provisioning config files that grafana will apply on startup and while running.
;provisioning = conf/provisioning

[server]
# Protocol (http, https, socket)
;protocol = http

# The ip address to bind to, empty will bind to all interfaces
;http_addr =

# The http port  to use
# ;http_port = 3000
;http_port = 8080

3).启动

a).Telegraf

telegraf.exe -sample-config -input-filter cpu:mem -output-filter influxdb > telegraf_2.conf

telegraf --config telegraf_2.conf

b).Influxdb

influxd.exe

c).Chronograf

chronograf.exe

d).Kapacitor

kapacitord.exe

kapacitor.exe define task_test -tick kapacitord_test.tick -dbrp "monitor_db.autogen" -type "stream"

e).Grafana

grafana-server.exe

4).验证

a).Influxdb

influx.exe

b).Chronograf

URL: http://localhost:8888
Username: admin
Password: admin

登陆

选择Dashboards

连接Kapacitor

c).Grafana

URL: http://localhost:3000
Username: admin
Password: admin

配置数据源

Ⅲ).监控数据

Chronograf

Grafana

目录
相关文章
|
JSON 搜索推荐 程序员
『GitHub项目圈选15』推荐5款本周 深受程序员喜爱 的开源项目
『GitHub项目圈选15』推荐5款本周 深受程序员喜爱 的开源项目
534 1
|
27天前
|
人工智能 网络协议 机器人
2026年OpenClaw(原ClawdBot)部署接入QQ/飞书/钉钉/微信喂饭教程(阿里云专属,零基础保姆级)
2026年,OpenClaw(原ClawdBot,曾用名Moltbot)凭借“自然语言驱动+多任务自动化执行+全渠道适配”的核心优势,成为开源AI智能体赛道的现象级项目,GitHub星标数突破18.6万,吸引了无数个人用户和企业团队投身部署使用。作为一款定位为“真正能干事情的AI”,OpenClaw的核心价值不仅在于自动化办公、代码辅助、网页抓取等基础功能,更在于其强大的多渠道对接能力——可无缝接入QQ、飞书、钉钉、微信(喂饭模式)四大主流通讯工具,让AI助理突破Web控制台的限制,融入日常聊天场景,实现“聊两句就能下达指令、完成任务”。
1531 6
|
6月前
|
运维 Kubernetes Cloud Native
《K8s网络策略与CNI插件交互问题分析:基于真实案例的排查方法》
本文聚焦云原生集群中因网络策略配置缺陷引发的跨节点服务通信故障。某开源分布式存储系统的数据平面组件突发大规模连接中断,跨节点gRPC请求失败率激增,但基础网络层与节点状态显示正常,呈现隐蔽的"策略级"故障特征。技术团队排查发现,新升级节点的CNI插件与网络策略控制器版本不匹配,叠加节点亲和性(指定网卡型号)与网络能力(驱动兼容性)的错配,导致工作负载被调度至功能不完整的节点。进一步分析揭示,命名空间级NetworkPolicy的规则冲突在跨节点流量经不同厂商CNI插件处理时被放大,相同流量在Calico与Cilium引擎中呈现差异化过滤结果。通过构建策略沙箱验证、优化节点能力匹配模型、实施故障
375 28
|
7月前
|
传感器 数据采集 消息中间件
怎么处理多源异构数据?搞不清楚就别谈数据融合!
在数据分析中,处理多源异构数据是关键挑战。本文详解其定义、常见问题及融合策略,结合实际场景提供全流程解决方案,助你高效实现数据价值。
|
6月前
|
机器学习/深度学习 自然语言处理 PyTorch
Transformer自回归关键技术:掩码注意力原理与PyTorch完整实现
掩码注意力是生成模型的核心,通过上三角掩码限制模型仅关注当前及之前token,确保自回归因果性。相比BERT的双向注意力,它实现单向生成,是GPT等模型逐词预测的关键机制,核心仅需一步`masked_fill_`操作。
531 0
Transformer自回归关键技术:掩码注意力原理与PyTorch完整实现
|
设计模式 API 数据处理
TICK 中Kapacitor功能和使用说明
TICK 中Kapacitor功能和使用说明
477 2
HTTPS 证书自动化运维:https证书管理系统之自动化签发
通过访问【https://www.lingyanspace.com】注册账户,进入证书服务菜单并新增证书。填写域名(单域名、多域名或泛域名),创建订单后添加云解析DNS记录进行质检。确认完成后可下载证书,并支持后续查看、更新和定时更新功能。证书过期前15天自动更新,需配置邮箱接收通知。
HTTPS 证书自动化运维:https证书管理系统之自动化签发
|
SQL 关系型数据库 MySQL
SQL中,可以使用 `ORDER BY` 子句来实现排序功能
【10月更文挑战第26天】SQL中,可以使用 `ORDER BY` 子句来实现排序功能
1604 6
|
存储 UED 开发者
Flutter鸿蒙版本灵活使用方法间的回调处理复杂化的逻辑
在 Flutter 开发中,灵活使用函数回调可以提高代码的可重用性、简化异步编程、增强解耦设计和提升用户体验。本文通过一个简单的示例,展示了如何在 Flutter 中实现函数调用和回调的基本使用。示例代码包括主入口、页面组件和回调函数的定义与调用,详细解析了每个部分的功能和作用。通过这种方式,开发者可以在操作完成后执行特定逻辑,使代码更易读和维护。
328 0
|
容器 Docker Linux
如何将当前用户添加到Docker组?
【7月更文挑战第25天】
3476 2
如何将当前用户添加到Docker组?

热门文章

最新文章