首页 > 数据库技术 > 详细

telegraf + influxdb + grafana 监控 redis

时间:2021-05-21 09:31:11      阅读:26      评论:0      收藏:0      [点我收藏+]

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

telegraf + influxdb + grafana 监控 redis

原文:https://www.cnblogs.com/hixiaowei/p/14792120.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!