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

目录
相关文章
|
1月前
|
监控 API Apache
实战!配置DataDog监控Apache Hudi应用指标
实战!配置DataDog监控Apache Hudi应用指标
21 0
|
6月前
|
存储 Prometheus 监控
服务搭建篇(一) 搭建基于prometheus + node_exporter + grafana + Alertmanager 的监控报警系统 , 保姆级教程
Alertmanager处理客户端应用程序(如Prometheus服务器)发送的警报。它负责重复数据删除、分组,并将它们路由到正确的接收器集成,如电子邮件、PagerDuty或OpsGenie。它还负责静音和抑制警报
185 0
|
缓存 Prometheus 监控
Metrics-Server指标获取链路分析
Metrics-server基于cAdvisor收集指标数据,获取、格式化后以metrics API的形式从apiserver对外暴露,核心作用是为kubectl top以及HPA等组件提供决策指标支持。
1617 6
|
存储 Prometheus 运维
Prometheus 运维工具 Promtool (四)TSDB 功能
Promtool 在 TSDB 方面一个有 6 个子命令,分别用来进行写性能测试、分析、列出其中的块、dump、从 OpenMetric 导入数据块、为新的记录规则创建数据块,接下来我们依次看一下。
1436 0
|
分布式计算 运维 监控
Apache Doris Grafana监控指标介绍
整个集群重点关注的几个指标。
725 0
Apache Doris Grafana监控指标介绍
|
机器学习/深度学习 数据采集 监控
iLogtail 入门-采集Telegraf Metrics 数据
# 前言阿里已经正式[开源](https://mp.weixin.qq.com/s/hcCYBZ0qvs8q4Wp1zFt-lg) 了可观测数据采集器iLogtail。作为阿里内部可观测数据采集的基础设施,iLogtail承载了阿里巴巴集团、蚂蚁的日志、监控、Trace、事件等多种可观测数据的采集工作。本文将介绍iLogtail如何与Telegraf协同工作,采集指标数据。# 采集配置iLogta
244 0
|
SQL 存储 数据采集
SpringBoot整合TICK(Telegraf+InfluxDB+Chronograf +Kapacitor)监控系列之一:InfluxDB
TICK各个模块说明如下所示: T(Telegraf):服务监控数据采集,包括服务器CPU、内存、IO、进程状态、服务状态等等; I(InfluxDB):时序型数据库,存储Telegraf采集的监控数据,每条数据都会有time序列; C(Chronograf):时间序列数据可视化展示; K(Kapacitor):可以按照预先编写好的规则,实时地订阅influxDB数据或者批量查询数据,并进行告警。
SpringBoot整合TICK(Telegraf+InfluxDB+Chronograf +Kapacitor)监控系列之一:InfluxDB
|
SQL 数据采集 网络协议
MySQL数据库审计采集技术调研之Packetbeat,eBPF
在数据安全的重要性日益突出的今天,数据库审计是数据安全的重要组成部分。在数据库审计的过程中往往需要关注数据库操作行为和性能数据:需要知道数据库来源IP,数据库服务器IP/端口,数据库登录用户,操作数据库名称,表名称,SQL语句,执行时间和返回数据条数等。这些数据的获取在数据库内核实现无疑是最佳的方式,但是并非所有的数据库都支持审计插件。几乎所有的数据库都是C/S模式,客户端与数据库通过网络协议沟通,数据库的协议大部分也是公开的,所以一种更通用的数据库审计数据采集的方案,应该是通过“外围”的抓包方案,具体是通过分析网络协议来采集数据库的行为数据。
2699 0
MySQL数据库审计采集技术调研之Packetbeat,eBPF

热门文章

最新文章