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

posted @   littlevigra  阅读(664)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App
历史上的今天:
2020-05-21 git 简单操作 jenkins 多节点 + Jenkins基本安装及插件离线安装
2019-05-21 (转)shell脚本使用curl获取访问网站的状态码
2018-05-21 ansible copy 模块 changed false 没有变化
点击右上角即可分享
微信分享提示