telegraph.conf配置
原文: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配置的更多相关文章
- apache 虚拟主机详细配置:http.conf配置详解
apache 虚拟主机详细配置:http.conf配置详解 Apache的配置文件http.conf参数含义详解 Apache的配置由httpd.conf文件配置,因此下面的配置指令都是在httpd. ...
- LINUX优化得很好的sysctl.conf配置
最近找了个不错的sysctl.conf的优化参数,在网站响应上已经算不错了的,time超时连接据说几乎为0了. 系统:centos 5.x sysctl.conf配置参数: kernel.msgmn ...
- Linux下/etc/resolv.conf 配置DNS客户
文件/etc/resolv.conf配置DNS客户,它包含了主机的域名搜索顺序和DNS服务器的地址,每一行应包含一个关键字和一个或多个的由空格隔开的参数.下面是一个例子文件: search mydom ...
- redis.conf 配置详解
# Redis 配置文件 # 当配置中需要配置内存大小时,可以使用 1k, 5GB, 4M 等类似的格式,其转换方式如下(不区分大小写) # # 1k => 1000 bytes # 1kb = ...
- linux下Nginx配置文件(nginx.conf)配置设置详解(windows用phpstudy集成)
linux备份nginx.conf文件举例: cp /usr/local/nginx/nginx.conf /usr/local/nginx/nginx.conf-20171111(日期) 在进程列表 ...
- 网卡配置和DNS配置,手动挂在nas存储的共享目录,网络相关其它操作命令,修改防火墙中的端口配置,resolv.conf配置详细介绍和网卡信息配置详细介绍
1. 网卡配置和DNS配置 若想服务器能够发邮件,需要让部署的服务器能够访问到外网环境.若部署的服务器访问不到外网,通过ping www.baidu.com的方式执行的时候,会出现以下问题: &q ...
- nginx.conf添加lua.conf配置
1.在nginx的conf下配置lua.conf......vi lua.conf server { listen ; server_name _; location /lua { default_t ...
- redis.conf 配置信息:读取及修改命令
相关资源 网址 官方地址(网页中 Command + F,输入井号"#",方便查看没有注释的行) http://download.redis.io/redis-stable/red ...
- Redis:redis.conf配置
redis.conf配置: 配置主要分为几类:基础.快照.复制.安全.限制.详细日志.虚拟内存.高级配置.文件包含 ##------------------------------------基础配置 ...
随机推荐
- TZOJ 3244 Happy YuYu's Birthday(数学几何)
描述 9月10日教师节,也是YuYu的生日,妈妈给YuYu准备了一个很大的圆形蛋糕,YuYu看中了蛋糕中间那诱人的樱桃(都挤到一块啦),小家伙很高兴,心里开始盘算着如何将樱桃全部分给自己.YuYu是个 ...
- 浅析java修饰符之public default protected private static final abstract
浅析java修饰符之public default protected private static final abstract 一 修饰符的作用:用来定义类.方法或者变量,通常放在语句的最前端 ...
- EasyUI Dialog 对话框默认不弹出和关闭清空对话框内容
EasyUI中文网: http://www.jeasyui.net/plugins/181.html 默认不弹出:closed:true 模式化窗口(有遮罩):modal:true <div c ...
- String.format的用法
有些时候,对于一些东西,不是没有简单的方法,而是我们没有接触到过 String.format();即创建格式化的字符串,里面有很多的通配使用符号,我这里说一下我接触到的,以后接触到其他的再填坑 它的内 ...
- js去除字符串空格(空白符)
使用js去除字符串内所带有空格,有以下三种方法: ( 1 ) replace正则匹配方法 去除字符串内所有的空格:str = str.replace(/\s*/g,""); 去除字 ...
- 什么是MVVM模式
问题引入1 场景一:团队辛辛苦苦完成了一个项目,抱着激动的心情去给用户做demo,而用户给你的反馈是UI很不满意,要重新修改,否则拒绝验收.大规模修改UI,晴天霹雳!2 场景二:产品在一家客户上线运行 ...
- C# mysql 插入数据,中文乱码
用C#操作mysql时, 插入数据中文都是乱码,只显示问号,数据库本身使用的是utf-8字符. 网上百度一下有两种解决办法: 一种是在执行语句前面设置,如:MySQLCommand mCommand ...
- nested exception is java.lang.NoClassDefFoundError: org/springframework/dao/support/PersistenceExceptionTranslator
该问题是少了一个spring-tx-的jar包,把该包加入到buildpath中就行了. 参考链接:http://blog.csdn.net/Rongbo_J/article/details/4666 ...
- Nowcoder 练习赛26E 树上路径 - 树剖
Description 传送门 给出一个n个点的树,1号节点为根节点,每个点有一个权值 你需要支持以下操作 1.将以u为根的子树内节点(包括u)的权值加val 2.将(u, v)路径上的节点权值加va ...
- 糟糕的@@identity,SCOPE_IDENTITY ,IDENT_CURRENT
在某数据库里面,某甲用@@identity来获取最近插入的id值,当在多人环境,发生获取到null值的问题. 那么@@identity是否有存在的必要? 感觉像生个孩子,多了个指头. 有的数据库的ge ...