项目键是:
system.run [cat / sys / block / sda / queue / rotating]
项目预处理
^.*1.*$ -> HDD
信息中心显示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->SSD
,1-HDD
建立一个价值地图,并将其称为"Disk Type"
"Numeric (Unsigned)"
Show Value
参数从"As is"
重新配置为"Disk Type"