天天看點

Zabbix value cache working in low memory mode

Zabbix監控自身時告警“Zabbix value cache working in low memory mode”,出現這個問題是因為Zabbix Server的參數ValueCacheSize大小設定不合理。一般預設值為8M。

Zabbix value cache working in low memory mode

### Option: ValueCacheSize

#       Size of history value cache, in bytes.

#       Shared memory size for caching item history data requests.

#       Setting to 0 disables value cache.

#

# Mandatory: no

# Range: 0,128K-64G

# Default:

# ValueCacheSize=8M

ValueCacheSize

0,128K-64G

8M

曆史資料緩存大小, 機關為位元組。

0即禁止緩存 (不建議).

當緩存大小超過共享記憶體時,每5分鐘會向伺服器日志寫入一條警告資訊。

從 Zabbix 2.2.0開始支援該參數。

no

Size of history value cache, in bytes.

Shared memory size for caching item history data requests.

Setting to 0 disables value cache (not recommended).

When value cache runs out of the shared memory a warning message is written to the server log every 5 minutes.

This parameter is supported since Zabbix 2.2.0.

為了更快地計算觸發器表達式、計算或聚合類型監控項和一些宏。自ZABBIX 2.2起,ZABBIX Server支援值緩存選項。

這個存放在記憶體中的緩存,可以用于通路曆史資料,而不需要對資料庫直接執行SQL調用。如果緩存中不存在請求得曆史值,則會從資料庫請求缺失的資料,并相應地更新緩存。

要啟用值緩存功能,Zabbix伺服器配置檔案支援可選的ValueCacheSize參數。

調整ValueCacheSize=256M大小(根據實際情況進行調整大小),然後重新開機Zabbix Server伺服器,即可解決問題

systemctl restart zabbix-server

參考資料:

https://www.zabbix.com/documentation/4.0/zh/manual/appendix/config/zabbix_server