.操作系统基础监控指标配置标准
基础监控使用通用的全局配置文件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的配置的更多相关文章

  1. 部署grafana+telegraf+influxdb 及 配置 jmeter后端监听

    搞性能测试,可以搭建Grafana+Telegraf+InfluxDB 监控平台,监控服务器资源使用率.jmeter性能测试结果等. telegraf: 是一个用 Go 编写的代理程序,可收集系统和服 ...

  2. UE4 Virtual Reality Input输入配置表导入

    [/Script/Engine.InputSettings] AxisConfig=(AxisKeyName="OculusTouch_Right_FaceButton2",Axi ...

  3. Telegraf安装与介绍

    Telegraf 是什么? Telegraf 是一个用 Go 编写的代理程序,是收集和报告指标和数据的代理.可收集系统和服务的统计数据,并写入到 InfluxDB 数据库.Telegraf 具有内存占 ...

  4. telegraph.conf配置

    原文:http://www.cnblogs.com/smail-bao/p/7002361.html 1.操作系统基础监控指标配置标准 基础监控使用通用的全局配置文件telegraf.conf,以下只 ...

  5. 采集-telegraf

    1 介绍 Telegraf是一款Go语言编写的metrics收集.处理.聚合的代理其设计目标是较小的内存使用,通过插件来构建各种服务和第三方组件的metrics收集Telegraf由4个独立的插件驱动 ...

  6. 以实现MongoDB副本集状态的监控为例,看Telegraf系统中Exec输入插件如何编写部署

    既有的Telegraf 关于MongoDB的输入插件很难实现对副本集节点状态的监控,副本集节点状态有 PRIMARY.SECONDARY.RECOVERYING.ARBITER 等.现在我们尝试通过  ...

  7. 通过 Telegraf + InfluxDB + Grafana 快速搭建监控体系的详细步骤

    第一部分 Telegraf 部署和配置 Telegraf 是实现 数据采集 的工具.Telegraf 具有内存占用小的特点,通过插件系统开发人员可轻松添加支持其他服务的扩展. 在平台监控系统中,可以使 ...

  8. Telegraf+Influxdb+Grafana自动化运维监控

    概述:Telegraf收集信息,influxdb时序数据库存储数据,grafana平台展示数据,并进行监控告警,组成一个自动化运维监控平台. 一.influxdb ​ InfluxDB是一个由Infl ...

  9. linux iptables常用命令之配置生产环境iptables及优化

    在了解iptables的详细原理之前,我们先来看下如何使用iptables,以终为始,有可能会让你对iptables了解更深 所以接下来我们以配置一个生产环境下的iptables为例来讲讲它的常用命令 ...

随机推荐

  1. Hive Web Interface的安装

    Hive Web Interface,简称hwi,是Hive的Web接口. 首先,安装ant,下载ant,解压,并在/etc/profile中设置: export ANT_HOME=/opt/apac ...

  2. Eclipse使用Maven创建Dynamic Web Project

    1. 点击File->New->Other,在弹出的对话框中选择Maven->Maven Project: 2. 点击Next,选择maven-archetype-webapp: 3 ...

  3. top命令参数

    参数说明 d 指定每两次屏幕信息刷新之间的时间间隔.当然用户可以使用s交互命令来改变之. p 通过指定监控进程ID来仅仅监控某个进程的状态. q该选项将使top没有任何延迟的进行刷新.如果调用程序有超 ...

  4. C/C++与Java的区别

    转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/5827273.html     C/C++:             C/C++代码——编译(不同的系统编译出不 ...

  5. Android实训案例(七)——四大组件之中的一个Service初步了解,实现通话录音功能,抽调接口

    Service Service的奇妙之处.在于他不须要界面,一切的操作都在后台操作,所以非常多全局性(手机助手,语音助手)之类的应用非常长须要这个.我们今天也来玩玩 我们新建一个project--Se ...

  6. 关于通信的关键词UDP/(TCP/IP)/IPC/RPC/.NET Remoting/WebService/WCF/Http 系列

    OSI七层和TCP/IP四层的关系 1.1 OSI引入了服务.接口.协议.分层的概念,TCP/IP借鉴了OSI的这些概念建立TCP/IP模型. 1.2 OSI先有模型,后有协议,先有标准,后进行实践: ...

  7. MySQL Replication主从复制环境下修改主库IP

    因为调整服务器子网, 数据库服务器的IP地址需要修改. 这个过程中, 需要确保的就是从库在断开主库后, 能从正确的位置再次启动. 具体的操作步骤如下 1) 需要获取的前提信息: 主库的新IP, 这在启 ...

  8. Oracle用分区表分区交换做历史数据迁移

    一. 说明: OLTP库中有些表数据量大,且每月有持续的大量数据添加.因为历史数据在此库中不再做訪问,而是在另1个OLAP库中做分析.所以会对历史数据迁移至OLAP库中.对这样的历史数据迁移的操作.较 ...

  9. 在 Laravel 5.1 中使用 Pjax

    在 Laravel 5.* 的版本中,使用 Pjax 实现无刷新效果,以及酷炫的进度条 项目地址:https://github.com/yccphp/pjax-for-laravel-5 求 star ...

  10. PHP调用mysql函数整理

    mysql函数整理 名称:mysql_connect() 用途:打开非持久的 MySQL 连接.如果成功,则返回一个 MySQL 连接标识,失败则返回 FALSE. 语法:mysql_connect( ...