problem:
When using Zabbix to monitor some cloud hosts, you may encounter:
Lack of free swap space on Zabbix server1
The picture is as follows:
Use the command:
free -m
see:
Swap's total, used, and free values are all 0. This is because Zabbix does not consider cloud host users.
Processing steps:
1. Management-Template-Template OS Linux-Trigger
2. 选择 Lack of free swap space on {HOST.NAME}
3. Modify Expression
{
Template OS Linux:system.swap.size[,pfree].last(0)}<501
change into
{
Template OS Linux:system.swap.size[,pfree].last(0)}<50 and {
Template OS Linux:system.swap.size[,free].last(0)}<>0
Click Update to save, wait for a while, it will become "Resolved", confirm