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

本文涉及的产品
可观测可视化 Grafana 版,10个用户账号 1个月
简介: 一.简述 通过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

目录
相关文章
|
Shell 开发工具
【优化篇】telegraf+shell脚本实现秒级的服务状态异常监测与告警
【优化篇】telegraf+shell脚本实现秒级的服务状态异常监测与告警
317 0
|
Prometheus 监控 Cloud Native
Prometheus VS InfluxDB
前言 除了传统的监控系统如 Nagios,Zabbix,Sensu 以外,基于时间序列数据库的监控系统随着微服务的兴起越来越受欢迎,比如 Prometheus,比如 InfluxDB。gtt 也尝试了一下这两个系统,希望能找到两者的差别,为以后选型提供一些帮助。
9507 0
|
运维 负载均衡 网络协议
从底层技术来看,GSLB 究竟难在哪儿
本文作者吕宏利来自硅谷的SRE,有着多年的国内外大型互联网公司运维开发经验,专注于分布式系统设计、监控、容量规划,数据中心技术以及生产环境的最佳实践。在本文中他将他将向读者介绍什么是GSLB,以及实现细节和维护方法。
8696 0
|
监控 Shell Go
如何自己写一个telegraf的插件
之前有个特殊需求要自己搞一个telegraf的插件,就顺手写了这个小指南,go初学者级别吧
1518 0
|
数据采集 存储 监控
InfluxDB与Telegraf:数据采集与监控实战
【4月更文挑战第30天】本文介绍了InfluxDB和Telegraf在数据采集与监控中的应用。InfluxDB是高性能的时序数据库,适合高吞吐量和实时查询,而Telegraf是数据采集代理,能收集多种系统指标并发送至InfluxDB。实战部分涉及安装配置两者,通过Telegraf收集数据,然后使用InfluxDB查询分析,配合Grafana实现可视化展示,从而实现有效的监控解决方案。
|
7月前
|
机器学习/深度学习 人工智能 并行计算
一文了解火爆的DeepSeek R1 | AIGC
DeepSeek R1是由DeepSeek公司推出的一款基于强化学习的开源推理模型,无需依赖监督微调或人工标注数据。它在数学、代码和自然语言推理任务上表现出色,具备低成本、高效率和多语言支持等优势,广泛应用于教育辅导、金融分析等领域。DeepSeek R1通过长链推理、多语言支持和高效部署等功能,显著提升了复杂任务的推理准确性,并且其创新的群体相对策略优化(GRPO)算法进一步提高了训练效率和稳定性。此外,DeepSeek R1的成本低至OpenAI同类产品的3%左右,为用户提供了更高的性价比。
2329 11
|
存储 数据采集 监控
Telegraf 使用小结
Telegraf 使用小结
226 1
|
设计模式 API 数据处理
TICK 中Kapacitor功能和使用说明
TICK 中Kapacitor功能和使用说明
249 2
|
存储 监控 前端开发
Sentry 监控部署与使用(详细流程)
Sentry 监控部署与使用(详细流程)
12415 1
|
存储 监控 Linux
性能监控之Telegraf+InfluxDB+Grafana linux服务器实时监控
【6月更文挑战11天】标题性能监控之 Java Metrics 度量包性能监控之Telegraf+InfluxDB+Grafana linux服务器实时监控
292 2