[ZBX-18948] 5.0.8 agent constantly logs swap items not supported Created: 2021 Jan 30  Updated: 2021 Sep 29  Resolved: 2021 Feb 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 5.0.8
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Markku Leiniö Assignee: Zabbix Support Team
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, tested with Debian 10 and Ubuntu 18.04


Issue Links:
Duplicate
duplicates ZBX-18398 system.swap.size[,pfree] error on Win... Closed

 Description   

Steps to reproduce:

  1. Have system.swap.size[,free] item for an active agent on Linux
  2. Update the agent from version 5.0.5 to 5.0.8 (server is on 5.0.8)

Result:

Zabbix agent starts logging in /var/log/zabbix/zabbix_agent.log:

898:20210130:210026.099 active check "system.swap.size[,free]" is not supported: Cannot be calculated because swap file size is 0.
898:20210130:210026.099 active check "system.swap.size[,pfree]" is not supported: Cannot be calculated because swap file size is 0.

This happens every two minutes (maybe system configuration-dependent interval).

Expected:
No errors logged in agent log file even though there is no Linux swap configured. The errors were not logged before upgrading the agent from 5.0.5 to 5.0.8.



 Comments   
Comment by Markku Leiniö [ 2021 Jan 30 ]

Agent is installed from the official Zabbix repo.

Comment by Markku Leiniö [ 2021 Jan 30 ]

I see this has been intentionally implemented in December 2020:

https://git.zabbix.com/projects/ZBX/repos/zabbix/commits/c0b294c927bb416346e2f5d7446cc78eda98231a

https://support.zabbix.com/browse/ZBX-18398

Do note that for example VMs spun up in cloud platforms don't usually have any swap configured, so the agents will constantly log these errors when using the usual Linux templates having swap monitoring.

Comment by Elina Kuzyutkina (Inactive) [ 2021 Feb 01 ]

Hello,
yes, you correctly noted that this is a consequence of the indicated ZBX.
This behavior is by design. before that, these metrics were also not collected - but now you can see an understandable reason in the logs.
If you don't need these item's in your monitoring - review the template you are currently using and disable\delete those items - not to spam logs
Close this ticket with Won't fix
Regrads, Elina

Comment by Markku Leiniö [ 2021 Feb 01 ]

How about indicating this change in the release notes?

Comment by Tomas [ 2021 Mar 02 ]

Since swap check item is usually used in a default "Linux" template,

what is suggested way to disable items per host without manually going thought each?

Comment by Markku Leiniö [ 2021 Sep 29 ]

Thanks for fixing this in https://support.zabbix.com/browse/ZBXNEXT-6784  I see

 

Generated at Sun Mar 16 02:26:16 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.