经历1 我在为一个主机创建了两个item之后,却发现一个有lastst data一个却有没有?这让我费尽脑子去想!


后来我以为是zabbix慢导致,过一天就会出现,可以到了第二天仍然没有现在lastst data列表中


后来结论是 key始终没有获取数据,一直在执行当中: 

验证:

zabbix_get -s hostip -k net.tcp.port[desip,80]



经历2 定义了一个item之后也没有在lastst data列表中

后来查看create item的配置和 官网对比

发现了

Update interval (in sec)  这个选项,且我定义为了0


对照官网解释:

Retrieve a new value for this item every N seconds.

Note: If set to '0', the item will not be polled. However, if a custom interval (flexible/scheduling) also exists with a non-zero value, the item will be polled during the custom interval duration.


后来我把 interval 调成60 后就出现了


总结:


item但是last date中没有数据的原因:

 

原因1:   -s 没数据

原因2:  create item 方式不对