zoukankan      html  css  js  c++  java
  • telegraf + influxdb + grafana 监控 redis

    1. telegraf的redis配置

    [root@influxdb137 ~]# cat  /etc/telegraf/telegraf.conf
    [global_tags]
    
    [agent]
    
      interval = "10s"
    
      round_interval = true
    
      metric_batch_size = 1000
    
      metric_buffer_limit = 10000
    
      collection_jitter = "0s"
    
      flush_interval = "10s"
    
      flush_jitter = "0s"
    
      precision = ""
    
      debug = false
    
      quiet = false
    
      logfile = "/tmp/telegraf.log"
    
      hostname = ""
    
      omit_hostname = false
    
    
    
    [[outputs.influxdb]]
    
      urls = ["http://192.168.162.137:8086"]
    
      database = "telegraf"
    
      username = "fxkj"
    
      password = "123456"
    
    
    
    [[inputs.cpu]]
    
      percpu = false
    
      totalcpu = true
    
      collect_cpu_time = false
    
      report_active = false 
    
      fieldpass = ["usage_idle", "usage_iowait", "usage_system", "usage_user"]
    
    
    
    [[inputs.system]]
    
    fieldpass = ["load1", "load5", "load15"]
    
    
    
    [[inputs.mem]]
    
    fieldpass = ["available"]
    
    
    
    [[inputs.disk]]
    
    fieldpass = ["free", "inodes_free", "used_percent"]
    
    ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]
    
    
    
    [[inputs.diskio]]
    
    fieldpass = ["read_bytes", "write_bytes", "reads","writes"]
    
    
    
    [[inputs.net]]
    
      interfaces = ["ens33"]
    
    [[inputs.redis]]
      ## specify servers via a url matching:
      ##  [protocol://][:password]@address[:port]
      ##  e.g.
      servers = ['tcp://192.168.1.45:6379']
     
    #tcp://192.168.1.45:6379
      ##    tcp://:password@192.168.99.100
      ##    unix:///var/run/redis.sock
    
    [root@influxdb137 ~]# 

    2. influxdb的配置

    [root@influxdb137 ~]# cat  /etc/influxdb/influxdb.conf |egrep -v '#' |grep -v '^$'
    bind-address = "192.168.1.45:8088"
    [meta]
      dir = "/var/lib/influxdb/meta"
    [data]
      dir = "/var/lib/influxdb/data"
      wal-dir = "/var/lib/influxdb/wal"
      series-id-set-cache-size = 100
    [coordinator]
    [retention]
    [shard-precreation]
    [monitor]
    [http]
      enabled = true
      auth-enabled = true
    [logging]
    [subscriber]
    [[graphite]]
    [[collectd]]
    [[opentsdb]]
    [[udp]]
    [continuous_queries]
    [tls]
    [root@influxdb137 ~]# 

     3.redis的grafana的dashboard:6908

    https://grafana.com/grafana/dashboards/6908/revisions

    用一个例子来演示会更加清晰
  • 相关阅读:
    (十五)、常见的几种RuntimeException
    (十四)、泛型中extends和super的区别
    (十三)、Java泛型
    (十二)、构造方法、静态属性和静态方法的使用要点
    (十一)、final,finally,finalize的区别
    (十)、java内部类与内部类的闭包和回调
    (九)、线程sleep和wait的区别
    (八)、java中==和equals和hashCode的区别
    sketch中做outline icon的制作技巧
    sketch Measure的安装及使用
  • 原文地址:https://www.cnblogs.com/hixiaowei/p/14792120.html
Copyright © 2011-2022 走看看