zoukankan      html  css  js  c++  java
  • Zabbix 5.0:磁盘自动发现和读写监控

    Blog:博客园 个人

    自动发现磁盘

    配置键值

    注意:此键值仅支持Linux平台。

    image-20210528214620058

    此发现键值返回两个宏 :

    • {#DEVNAME} :设备名
    • {#DEVTYPE} :设备类型

    例如:

    [ 
       { 
          "{#DEVNAME}":"loop1",
          "{#DEVTYPE}":"disk"
       },
       { 
          "{#DEVNAME}":"dm-0",
          "{#DEVTYPE}":"disk"
       },
       { 
          "{#DEVNAME}":"sda",
          "{#DEVTYPE}":"disk"
       },
       { 
          "{#DEVNAME}":"sda1",
          "{#DEVTYPE}":"partition"
       }
    ]
    

    配置过滤器

    用于过滤设备类型和设备名,通常磁盘名为sd*vd*

    image-20210528214841109

    测试验证

    image-20210528215006314

    添加磁盘读写速率监控

    磁盘读写键值:

    vfs.dev.read[<device>,<type>,<mode>]
    vfs.dev.write[<device>,<type>,<mode>]
    

    说明:

    • device - 磁盘设备 (默认为all)
    • type - 可能的值: sectors, operations, bytes, sps, ops, bps
      因为各种操作系统的默认值有所不同,所以这个参数必须被指定。
      sps, ops, bps 代表: sectors, operations, bytes per second, respectively.
    • mode - 可能的值: avg1 (1分钟平均值, 默认), avg5, avg15
      此参数仅支持这些类型: sps, ops, bps。

    注意:不同操作系统的“类型”参数的默认值是不一样的。

    因此,磁盘读写的监控键值可以配置为:

    • 读:vfs.dev.read[{#DEVNAME},sps]
    • 写:vfs.dev.write[{#DEVNAME},sps]

    image-20210528215745913

    其中当键值为vfs.dev.read[]vfs.dev.write[] 时允许使用 {#DEVNAME} 宏。

  • 相关阅读:
    D2. Remove the Substring (hard version)(思维 )
    暑假集训
    AcWing:167. 木棒(dfs + 剪枝)
    AcWing:109. 天才ACM(倍增 + 归并排序)
    AcWing:99. 激光炸弹(前缀和)
    B. Interesting Array(线段树)
    Best Reward HDU
    G. Swapping Places
    How many HDU
    GSS4&&花仔游历各国
  • 原文地址:https://www.cnblogs.com/Rohn/p/14823965.html
Copyright © 2011-2022 走看看