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