在zabbix项目中将1转换为HDD - >预处理

时间:2018-05-13 05:41:29

标签: zabbix

项目键是:

  

system.run [cat / sys / block / sda / queue / rotating]

image of item key configuration

项目预处理

^.*1.*$ -> HDD

image of preprocessing configuration

信息中心显示1而不是硬盘

Image of the dashboard

为什么?

1 个答案:

答案 0 :(得分:0)

根据文件:Failure to match the input value will make the item unsupported

我已实施您的设置,事实上:

item "MyZabbix:system.run[cat /sys/block/sda/queue/rotational]" became not supported: Item preprocessing step #2 failed: cannot perform regular expression match on value "HDD" of type "string": pattern does not match

这意味着第一个正则表达式正确运行,但当然第二个正则表达不匹配。

您需要实施Value Map

  • 使用0->SSD1-HDD建立一个价值地图,并将其称为"Disk Type"
  • 从项目中删除预处理
  • 将项目重新配置为"Numeric (Unsigned)"
  • 将项Show Value参数从"As is"重新配置为"Disk Type"