简体   繁体   English

Zabbix代理状态监视

[英]Zabbix agent status monitoring

What is the right way to monitor agent status? 监视座席状态的正确方法是什么? I want to be able to see whether agent is running or not. 我希望能够查看代理是否正在运行。 agent.ping item only shows if agent is Up , but it doesn't switch to Down . agent.ping项目仅显示agent是否agent.ping Up状态 ,但不会切换到Down状态 Simple check icmpping seems to behave the same way. 简单的检查icmpping似乎具有相同的行为。

The best way to monitor agent.ping is via triggers, and for that item you would use the nodata() trigger function (the default template already does that. 监视agent.ping的最佳方法是通过触发器,对于该项目,您将使用nodata()触发器函数(默认模板已经做到了)。

The icmpping item actually returns 1 when the host is reachable via ICMP ping, and 0 when not (but that's not really monitoring the agent). 当主机通过ICMP ping可访问时, icmpping项实际上返回1, icmpping返回0(但这实际上不是监视代理程序)。

If you want to see up/down in the item itself, you could monitor agent TCP port (10050 by default) with item like net.tcp.service - but using a trigger on agent.ping would be the recommended way still. 如果您想查看项目本身的上/下,则可以使用net.tcp.service项目监视代理程序TCP端口(默认为10050)-但仍然建议在agent.ping上使用触发器。

Instead of monitoring the port, you can have from version 2+ the internal Zabbix checks which stores the 0 and 1 values each time, not like agent.ping which only stores the value 1 (the main reason why you do not get a "Down" message). 从版本2+开始,您可以从内部监控Zabbix,而不是监视端口,它每次都存储0和1值,而不像agent.ping那样仅存储值1(您未获得“ Down”的主要原因“ 信息)。

https://www.zabbix.com/documentation/3.2/manual/config/items/itemtypes/internal https://www.zabbix.com/documentation/3.2/manual/config/items/itemtypes/internal

Key that you need is zabbix[host,agent,available] and the item type should be "Zabbix internal" instead of "Zabbix agent". 您需要的密钥是zabbix [host,agent,available],并且项目类型应该是“ Zabbix internal”而不是“ Zabbix agent”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM