当前位置:网站首页>prometheus+redis-exporter+grafana 监控redis服务
prometheus+redis-exporter+grafana 监控redis服务
2022-07-26 02:09:00 【努力,奋斗啊】
prometheus 配置文件修改
cat /data/prometheus/prometheus.yml
- job_name: redis_exporter
static_configs:
- targets: ['zunshang:9121','luodiyezhu:9122','luodiyebei:9121','guojing:9121','dingdan:9121','guanggao:9121']
relabel_configs:
- source_labels: [ "__address__" ]
regex: "(.*):(.*)"
target_label: "instance"
replacement: $1
部署redis-exporter 可查我的其他文章,此过程不累述。
重新加载prometheus配置文件
grafana 监控配置

redis-exporter 查询详解
- 查询redis实例占用内存使用率
100 * (redis_memory_used_bytes{
instance=~"$node"} / redis_config_maxmemory{
instance=~"$node"} )
redis_memory_used_bytes: redis 已使用的字节
redis_config_maxmemory: redis 配置文件中最大使用内存字节 (根据服务器内存大小给予内存配置) 默认为0 即不限制
redis实例占用内存使用率:使用内存空间 / redis配置文件最大内存空间 若为0 即无穷大
- 查询客户端连接redis实例数量
redis_connected_clients{
instance=~"$node"}
- 执行redis命令的速率
irate(redis_commands_processed_total{
instance=~"$node"}[5m])
- redis 命令及未命中速率
A irate(redis_keyspace_hits_total{
instance=~"$node"}[5m]) 命中
B irate(redis_keyspace_misses_total{
instance=~"$node"}[5m]) 未命中
- redis中所有库key的总数
sum (redis_db_keys{
instance=~"$node"}) by (instance)
- redis库中永久key的数量
sum(redis_db_keys{
instance=~"$node"})by (instance) - sum(redis_db_keys_expiring{
instance=~"$node"}) by (instance)
- redis中存在过期时间key的数量
sum(redis_db_keys_expiring{
instance=~"$node"}) by (instance)
- 过期keys的速率
rate(redis_expired_keys_total{
instance=~"$node"}[5m])
边栏推荐
- Acwing 379. hide and seek problem solution (minimum path non repeating point coverage)
- js给页面添加随机像素噪声背景
- I.MX6UL核心模块使用连载-Iot-6ULX核心模块简要介绍 (一)
- SQL手工盲注、报错注入
- I.MX6UL核心模块使用连载-RS485测试 (十)
- Redis cluster construction (based on 6.x)
- A MCU event driven C framework
- 商业智能BI全解析,探寻BI本质与发展趋势
- [leetcode] 32. Longest valid bracket
- I.MX6UL核心模块使用连载-CAN、蜂鸣器测试 (十一)
猜你喜欢

国标GB28181协议视频平台EasyGBS消息弹框模式优化

Postman报Json序列化错误

i.MX6ULL SNVS电源域GPIO状态保持验证

Worthington产气荚膜梭菌神经氨酸酶的特征及测定

Video game quiz? I think it's useless. It's better to do these well!

Obsidian mobile PC segment synchronization

What is the difference between for... In... And for... Of

QT program beautification of the use of style sheets, QT uses pictures as the background and transparency of controls, QT custom button styles

How to choose cloud note tool? What can I do with cloud notes?

Wechat applet decryption and unpacking to obtain source code tutorial
随机推荐
C# 迭代器的实现
Postman reported JSON serialization error
1. Mx6ul core module use serial RTC test (XII)
opengauss如何手工安装(非OM方式)
SQL manual blind injection and error reporting injection
1. Mx6ul core module uses serial NAND FLASH read / write test (III)
Niuke net question brushing training (I)
【PyQt5打包为exe】
How to install opengauss manually (non om mode)
【2020】【论文笔记】磁控溅射法生长Bi2Te3/CoFeB双层异质结——
I.MX6UL核心模块使用连载-nand flash读写测试 (三)
【2021】【论文笔记】6G技术愿景——OTFS调制技术
Make and makefile summary I
Worthington核酸酶、微球菌相关研究及测定方案
Worthington papain - production of glycopeptides from purified proteoglycans (attached Literature)
[xxl-job] xxl-job learning
[C language brush leetcode] 443. Compressed string (m)
1. Mx6ul core module use serialization - view system information (II)
Relationship between HTC mobile official solution, s-on/s-off and super CID
Alibaba cloud redis development specification