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. Simple check icmpping
seems to behave the same way.
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.
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).
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.