telegraf input的配置
.操作系统基础监控指标配置标准
基础监控使用通用的全局配置文件telegraf.conf,以下只贴上采集器input部分代码
telegraf -config /etc/telegraf/telegraf.d/telegraf.conf -input-filter http_response -test # Read metrics about cpu usage
[[inputs.cpu]]
interval = “60s”
percpu = true
totalcpu = true
fielddrop = [“time*”]
# Read metrics about disk usage by mount point
[[inputs.disk]]
interval = “10m”
# mount_points = [“/”]
ignore_fs = [“tmpfs”, “devtmpfs”]
# Read metrics about disk IO by device
[[inputs.diskio]]
interval = “60s”
# Get kernel statistics from /proc/stat
[[inputs.kernel]]
interval = “10m”
# Read metrics about memory usage
[[inputs.mem]]
interval = “10m”
# Get the number of processes and group them by status
[[inputs.processes]]
interval = “10m”
fielddrop = [“wait”,”idle”,”unknown”]
# Read metrics about swap memory usage
[[inputs.swap]]
interval = “1h”
fieldpass = [“used_percent”]
# Read metrics about system load & uptime
[[inputs.system]]
interval = “2m”
# # Read metrics about network interface usage
[[inputs.net]]
interval = “60s”
fieldpass = [“packets_*”,”bytes_*”,”drop_*”,”err_*”]
# # Read TCP metrics such as established, time wait and sockets counts.
[[inputs.netstat]]
interval = “5m”
fielddrop = [“tcp_none”,”tcp_closing”,”tcp_close*”]
# # Read ping metrics
[[inputs.ping]]
urls = [“www.qq.com”]
count =
ping_interval = 0.0
timeout = 0.0
interface = “eth0” .docker容器监控配置标准
对于基础监控之外的指标监控,需要使用新的配置文件,指定采集器的采集标准和配置,以及输出数据库(可选非必要),下同。
[[inputs.docker]]
interval = “5m”
endpoint = “unix:///var/run/docker.sock”
container_names = []
timeout = “10s”
perdevice = true
total = false
.mysql监控配置标准
# Read metrics from one or many mysql servers
[root@10-19-6-138 telegraf.d]# cat telegraf_mysql.conf
[[inputs.mysql]]
interval = "5m" 采集频率
servers = ["root:kgzg789@tcp(127.0.0.1:3306)/?tls=false"] 采集配置
perf_events_statements_digest_text_limit = 120
perf_events_statements_limit = 250
perf_events_statements_time_limit = 86400
table_schema_databases = [""]
gather_table_schema = false
gather_process_list = true
gather_info_schema_auto_inc = true
gather_slave_status = true
gather_binary_logs = false
gather_table_io_waits = false
gather_table_lock_waits = false
gather_index_io_waits = false
gather_event_waits = false
gather_file_events_stats = false
interval_slow = "30m" .haproxy配置标准
#vim /etc/telegraf/telegraf.d/mysql.conf [inputs.haproxy]
interval = “60s” #input采集频率
servers = [“/var/run/haproxy.sock”] #input参数配置 .nginx配置标准
[[inputs.nginx]]
interval = “60s”
urls = [“http://localhost/server_status”] .kafka配置标准
[[inputs.kafka_consumer]]
topics = [“telegraf”]
zookeeper_peers = [“localhost:”]
consumer_group = “telegraf_metrics_consumers”
metric_buffer =
offset = “oldest”
data_format = “influx” .zookeeper配置标准
[[inputs.zookeeper]]
servers = [“:”] .ovirt配置标准
.redis配置标准
# # Read metrics from one or many redis servers
[[inputs.redis]]
interval = “5m”
unix:///var/run/redis.sock
servers = [“tcp://localhost:6379”] .http网站监控
[[inputs.http_response]] interval = “1m”
address = “http://abc.com”
response_timeout = “15s”
method = “GET”
follow_redirects = true
.Ceph监控
[[inputs.ceph]]
interval = ‘1m’
ceph_binary = “/usr/bin/ceph”
socket_dir = “/var/run/ceph”
mon_prefix = “ceph-mon”
osd_prefix = “ceph-osd”
socket_suffix = “asok”
ceph_user = “client.admin”
ceph_config = “/etc/ceph/ceph.conf”
gather_admin_socket_stats = true
gather_cluster_stats = false
.ping监控
单独使用场景:主要作为WAN链路监控,URL监控的监测手段
[[inputs.ping]]
urls = [“www.qq.com”]
count =
ping_interval = 0.0
timeout = 0.0
interface = “eth0” .tcp端口监控
使用场景:主要作为本机端口应用监控
# # Generic TCP listener
[[inputs.tcp_listener]]
service_address = “:”
allowed_pending_messages =
max_tcp_connections =
data_format = “influx”
.端口流量监控
使用场景:主要作为入口或者外出服务器或者防火墙的端口流量监控
.IPMI监控
使用场景:主要作为物理机器基础电力设施的指标监控
# #IPMI1# #
[[inputs.ipmi_sensor]]
servers = [“root:password@lanplus(10.8.81.15)”] .http-json格式监控
使用场景:在特殊应用无任何匹配模板时,可使用json格式化数据后进行指标收集;
# [[inputs.httpjson]]
name = “webserver_stats”
servers = [
“http://localhost:9999/stats/”,
“http://localhost:9998/stats/”,
]
method = “GET”
tag_keys = [
“my_tag_1”,
“my_tag_2”
] .自定义sh脚本监控
使用场景:在以上都没有可用的监控采集配置外,可以使用自定义脚本格式收集指标;
[[inputs.exec]]
commands = [“/tmp/test.sh”,]
timeout = “15s”
data_format = “json”
name_suffix = “_mycollector”
.SQLserver监控
使用场景:用于监控SQLserver数据库性能
[[inputs.sqlserver]]
servers = [
“Server=192.168.1.30;Port=;User Id=telegraf;Password=T$l$gr@f69*;app name=dbname;log=;”
]
原文:http://www.lvkaineng.com/235.html
telegraf input的配置的更多相关文章
- 部署grafana+telegraf+influxdb 及 配置 jmeter后端监听
搞性能测试,可以搭建Grafana+Telegraf+InfluxDB 监控平台,监控服务器资源使用率.jmeter性能测试结果等. telegraf: 是一个用 Go 编写的代理程序,可收集系统和服 ...
- UE4 Virtual Reality Input输入配置表导入
[/Script/Engine.InputSettings] AxisConfig=(AxisKeyName="OculusTouch_Right_FaceButton2",Axi ...
- Telegraf安装与介绍
Telegraf 是什么? Telegraf 是一个用 Go 编写的代理程序,是收集和报告指标和数据的代理.可收集系统和服务的统计数据,并写入到 InfluxDB 数据库.Telegraf 具有内存占 ...
- telegraph.conf配置
原文:http://www.cnblogs.com/smail-bao/p/7002361.html 1.操作系统基础监控指标配置标准 基础监控使用通用的全局配置文件telegraf.conf,以下只 ...
- 采集-telegraf
1 介绍 Telegraf是一款Go语言编写的metrics收集.处理.聚合的代理其设计目标是较小的内存使用,通过插件来构建各种服务和第三方组件的metrics收集Telegraf由4个独立的插件驱动 ...
- 以实现MongoDB副本集状态的监控为例,看Telegraf系统中Exec输入插件如何编写部署
既有的Telegraf 关于MongoDB的输入插件很难实现对副本集节点状态的监控,副本集节点状态有 PRIMARY.SECONDARY.RECOVERYING.ARBITER 等.现在我们尝试通过 ...
- 通过 Telegraf + InfluxDB + Grafana 快速搭建监控体系的详细步骤
第一部分 Telegraf 部署和配置 Telegraf 是实现 数据采集 的工具.Telegraf 具有内存占用小的特点,通过插件系统开发人员可轻松添加支持其他服务的扩展. 在平台监控系统中,可以使 ...
- Telegraf+Influxdb+Grafana自动化运维监控
概述:Telegraf收集信息,influxdb时序数据库存储数据,grafana平台展示数据,并进行监控告警,组成一个自动化运维监控平台. 一.influxdb InfluxDB是一个由Infl ...
- linux iptables常用命令之配置生产环境iptables及优化
在了解iptables的详细原理之前,我们先来看下如何使用iptables,以终为始,有可能会让你对iptables了解更深 所以接下来我们以配置一个生产环境下的iptables为例来讲讲它的常用命令 ...
随机推荐
- 在大负载中使用LoadRunner进行负载测试()
在大负载中使用LoadRunner进行负载测试,需要配置一些环境来满足大负载下各种资源的充足: 1.为了避免出现“No Buffer Space Available”的错误,需要进行如下配置: 1)修 ...
- RHEL7 MariaDB测试
MariaDB安装及启动: yum groupinstall mariadb 启动mariadb systemctl restart mariadb systemctl enable mariadb ...
- RHEL7 在不同的环境中使用不同的网络配置文件
比如,我们可以设置RHEL7 系统在公司时使用一个网卡配置文件:在家时则使用另外一个配置文件(可以根据不同的环境设置多个网卡配置文件). 网卡配置信息如下: [root@rhel7 ~]# nmcli ...
- Spring Cloud环境搭建: Eureka Server
项目目录结构, 总共三个文件 ├── pom.xml └── src ├── main │ ├── java │ │ └── com │ │ └── rockbb │ │ ...
- 没有找到AdbWinApi.dll
今天调试adb命令时遇到一些问题 1. 没有找到AdbWinApi.dll 2. adb server is out of date. killing... ADB server didn't AC ...
- 腾讯alloyteam团队前端代码规范
来源于:http://alloyteam.github.io/CodeGuide/ 命名规则 项目命名 全部采用小写方式, 以下划线分隔. 例:my_project_name 目录命名 参照项目命名规 ...
- [转载]RHEL-6启动时提示:“/usr/libexec/gconf-sanit
原文地址:RHEL-6启动时提示:"/usr/libexec/gconf-sanity-check-2 exited with status 256"作者:huage 系统环境:R ...
- hihocoder234周 计算不包含黑点的矩形个数
题目链接 问题描述 一个棋盘有n条横线,m条竖线,上面有k个黑点,问有多少个不包含黑点的矩形. 数据范围: n和m最大为1000,k最大为10 方法一:动态规划 复杂度n*m*k. import ja ...
- vijos:旅行家的预算[贪心]
题目 Problem description 一个旅行家想驾驶汽车以最少的费用从一个城市到另一个城市(假设出发时油箱是空的).给定两个城市之间的距离D1.汽车油箱的容量C(以升为单位).每升汽油能行驶 ...
- permission denied (publickey)问题的解决 和 向github添加ssh key
使用ssh key这种方式进行clone ,pull github上面的项目,使用 git clone或者git pull origin master出现permission denied (publ ...