原文:http://www.cnblogs.com/smail-bao/p/7002361.html

1.操作系统基础监控指标配置标准
基础监控使用通用的全局配置文件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 = 1
ping_interval = 0.0
timeout = 0.0
interface = “eth0” 2.docker容器监控配置标准
对于基础监控之外的指标监控,需要使用新的配置文件,指定采集器的采集标准和配置,以及输出数据库(可选非必要),下同。
[[inputs.docker]]
interval = “5m”
endpoint = “unix:///var/run/docker.sock”
container_names = []
timeout = “10s”
perdevice = true
total = false
3.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" 4.haproxy配置标准
#vim /etc/telegraf/telegraf.d/mysql.conf [inputs.haproxy]
interval = “60s” #input采集频率
servers = [“/var/run/haproxy.sock”] #input参数配置 5.nginx配置标准
[[inputs.nginx]]
interval = “60s”
urls = [“http://localhost/server_status”] 6.kafka配置标准
[[inputs.kafka_consumer]]
topics = [“telegraf”]
zookeeper_peers = [“localhost:2181”]
consumer_group = “telegraf_metrics_consumers”
metric_buffer = 100000
offset = “oldest”
data_format = “influx” 7.zookeeper配置标准
[[inputs.zookeeper]]
servers = [“:2181”] 8.ovirt配置标准
9.redis配置标准
# # Read metrics from one or many redis servers
[[inputs.redis]]
interval = “5m”
unix:///var/run/redis.sock
servers = [“tcp://localhost:6379”] 10.http网站监控
[[inputs.http_response]] interval = “1m”
address = “http://abc.com”
response_timeout = “15s”
method = “GET”
follow_redirects = true
11.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
12.ping监控
单独使用场景:主要作为WAN链路监控,URL监控的监测手段
[[inputs.ping]]
urls = [“www.qq.com”]
count = 1
ping_interval = 0.0
timeout = 0.0
interface = “eth0” 13.tcp端口监控
使用场景:主要作为本机端口应用监控
# # Generic TCP listener
[[inputs.tcp_listener]]
service_address = “:8094”
allowed_pending_messages = 10000
max_tcp_connections = 250
data_format = “influx”
14.端口流量监控
使用场景:主要作为入口或者外出服务器或者防火墙的端口流量监控
15.IPMI监控
使用场景:主要作为物理机器基础电力设施的指标监控
# #IPMI1# #
[[inputs.ipmi_sensor]]
servers = [“root:password@lanplus(10.8.81.15)”] 16.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”
] 17.自定义sh脚本监控
使用场景:在以上都没有可用的监控采集配置外,可以使用自定义脚本格式收集指标;
[[inputs.exec]]
commands = [“/tmp/test.sh”,]
timeout = “15s”
data_format = “json”
name_suffix = “_mycollector”
18.SQLserver监控
使用场景:用于监控SQLserver数据库性能
[[inputs.sqlserver]]
servers = [
“Server=192.168.1.30;Port=1433;User Id=telegraf;Password=T$l$gr@f69*;app name=dbname;log=1;”
]

telegraph.conf配置的更多相关文章

  1. apache 虚拟主机详细配置:http.conf配置详解

    apache 虚拟主机详细配置:http.conf配置详解 Apache的配置文件http.conf参数含义详解 Apache的配置由httpd.conf文件配置,因此下面的配置指令都是在httpd. ...

  2. LINUX优化得很好的sysctl.conf配置

    最近找了个不错的sysctl.conf的优化参数,在网站响应上已经算不错了的,time超时连接据说几乎为0了.  系统:centos 5.x sysctl.conf配置参数: kernel.msgmn ...

  3. Linux下/etc/resolv.conf 配置DNS客户

    文件/etc/resolv.conf配置DNS客户,它包含了主机的域名搜索顺序和DNS服务器的地址,每一行应包含一个关键字和一个或多个的由空格隔开的参数.下面是一个例子文件: search mydom ...

  4. redis.conf 配置详解

    # Redis 配置文件 # 当配置中需要配置内存大小时,可以使用 1k, 5GB, 4M 等类似的格式,其转换方式如下(不区分大小写) # # 1k => 1000 bytes # 1kb = ...

  5. linux下Nginx配置文件(nginx.conf)配置设置详解(windows用phpstudy集成)

    linux备份nginx.conf文件举例: cp /usr/local/nginx/nginx.conf /usr/local/nginx/nginx.conf-20171111(日期) 在进程列表 ...

  6. 网卡配置和DNS配置,手动挂在nas存储的共享目录,网络相关其它操作命令,修改防火墙中的端口配置,resolv.conf配置详细介绍和网卡信息配置详细介绍

    1.   网卡配置和DNS配置 若想服务器能够发邮件,需要让部署的服务器能够访问到外网环境.若部署的服务器访问不到外网,通过ping www.baidu.com的方式执行的时候,会出现以下问题: &q ...

  7. nginx.conf添加lua.conf配置

    1.在nginx的conf下配置lua.conf......vi lua.conf server { listen ; server_name _; location /lua { default_t ...

  8. redis.conf 配置信息:读取及修改命令

    相关资源 网址 官方地址(网页中 Command + F,输入井号"#",方便查看没有注释的行) http://download.redis.io/redis-stable/red ...

  9. Redis:redis.conf配置

    redis.conf配置: 配置主要分为几类:基础.快照.复制.安全.限制.详细日志.虚拟内存.高级配置.文件包含 ##------------------------------------基础配置 ...

随机推荐

  1. selenium模拟事件处理

    执行原理: 调用ActionChains的方法时不会立即执行,会将所有的操作按顺序存放在一个队列里,当调用perform()方法时,从队列中的事件会依次执行. 支持链式写法或者是分布写法. 鼠标键盘方 ...

  2. iOS 组件化流程详解(git创建流程)

    [链接]组件化流程详解(一)https://www.jianshu.com/p/2deca619ff7e

  3. 左侧菜单栏,有对个li对应一个content

    html部分截图 不多说直接上js /*左侧导航栏*/var sect=$(".sect"); $(".nav-list .nav-a").each(funct ...

  4. js对象(BOM部分/DOM部分)

    JS总体包括ECMAScript,DOM,BOM三个部分,但是能够和浏览器进行交互的只有DOM和BOM,那么到底什么是DOM和BOM呢 概念 BOM(Browser Object Model)是指浏览 ...

  5. Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'

    项目报这个错误,后来查了,是缺少ojdbc,也就是java操作oracle的包,通过https://mvnrepository.com/artifact/oracle/ojdbc/1.4,可以找到该包 ...

  6. 如何在Windows下安装Tomcat服务器

    Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,属于轻量级应用服务器,在中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和调试JSP 程序的首选服务器.在Windows下安装 ...

  7. 约束 CONSTRAINT

    约束用于限制加入表中数据的类型 约束的种类: 非空约束(NOT NULL):约束列不接受NULL值,强制字段始终包含值. 唯一约束(UNIQUE):约束一列或一组列中的数据是唯一的.表中可以有多个唯一 ...

  8. python连接Linux服务器

    import paramikoimport os #当前脚本路径CUR_PATH = os.path.dirname(__file__) #服务器ipHost=''Port=22#登录用户名Usern ...

  9. js实现多标签页效果

    点击导航按钮切换div的内容 html代码: <div class="tabs"> <ul id="tab"> <li>&l ...

  10. 【UI测试】--快捷键组合