当前位置:网站首页>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])
边栏推荐
- Mark and lightbulbs (thinking)
- CD from grabbing the track to building a streaming media server -- a case study of "moon in the hometown of sleep"
- 一种MCU事件型驱动C框架
- Worthington产气荚膜梭菌神经氨酸酶的特征及测定
- [C language brush leetcode] 735. Planetary collision (m)
- Ti am335x industrial control module uses the Debian system of beaglebone (BBB)
- Postman报Json序列化错误
- How to install opengauss manually (non om mode)
- 由一个数据增量处理问题看到技术人员的意识差距
- 1. Mx6ul core module serial Ethernet test (VII)
猜你喜欢

Qt程序美化之样式表的使用方法,Qt使用图片作为背景与控件透明化,Qt自定义按钮样式

Composition API的优势

Error reporting caused by local warehouse

1. Mx6ul core module use serial TF card read / write test (V)

1. Mx6ul core module uses serial can and buzzer test (XI)

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

我来图书馆小程序一键签到和一键抢位置工具

CD from grabbing the track to building a streaming media server -- a case study of "moon in the hometown of sleep"

i. Mx6ull snvs power domain GPIO status hold verification

1. Mx6ul core module serial WiFi test (VIII)
随机推荐
Alibaba cloud redis development specification
obsidian移动端PC段同步
LeetCode302场周赛第三题--裁剪数字后查询第 K 小的数字
I.MX6UL核心模块使用连载-查看系统信息 (二)
The third question of leetcode 302 weekly Games -- query the number with the smallest k after cutting the number
Navica tool imports remote MySQL into local MySQL database
Wechat applet decryption and unpacking to obtain source code tutorial
[C language brush leetcode] 443. Compressed string (m)
【2021】【论文笔记】6G技术愿景——OTFS调制技术
2022.7.25-----leetcode.919
(CVPR 2019) GSPN: Generative Shape Proposal Network for 3D Instance Segmentation in Point Cloud
19_请求表单与文件
MySQL locking table problem
1. Mx6ul core module serial -iot-6ulx core module brief introduction (I)
How to choose cloud note tool? What can I do with cloud notes?
I.MX6UL核心模块使用连载-WIFI测试 (八)
Remember a laravel problem script @php artist package:discover handling the post autoload dump event returned with
1. Mx6ul core module uses serial EMMC read / write test (IV)
HTC手机官解、S-ON/S-OFF与超级CID的关系
opengauss如何手工安装(非OM方式)