telegraf + influxdb + grafana 监控 redis

Posted littlevigra

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

以上是关于telegraf + influxdb + grafana 监控 redis的主要内容,如果未能解决你的问题,请参考以下文章

Telegraf+Influxdb+Chronograf+Kapacitor主机性能监控告警

性能监控之Telegraf+InfluxDB+Grafana linux服务器实时监控

yum 安装 influxdb/telegraf

telegraf + influxdb + grafana 监控 redis

搭建grafana+influxdb+telegraf,以及常见问题

Telegraf/InfluxDB - 将整数拆分为位或布尔值