-
Patch request
-
Resolution: Fixed
-
Major
-
None
-
None
-
Prev.Sprint, S24-W42/43
-
1.5
Steps to reproduce:
- Start Zabbix Agent2
Result:
In /var/log/zabbix/zabbix_agent2.log there is a message:
2022/11/04 14:39:03.013506 lowering the plugin ZabbixSync capacity to 1 as the configured capacity 100 exceeds limits
Expected:
No warnings in log file with default configuration
Proposed ugly fix:
$ git diff diff --git a/src/go/internal/agent/scheduler/manager.go b/src/go/internal/agent/scheduler/manager.go index 14e96f4d01..346ed61bf2 100644 --- a/src/go/internal/agent/scheduler/manager.go +++ b/src/go/internal/agent/scheduler/manager.go @@ -490,10 +490,14 @@ func (m *Manager) init() { Â Â Â Â for _, metric := range metrics { Â Â Â Â Â Â Â Â if metric.Plugin != pagent.impl { Â Â Â Â Â Â Â Â Â Â Â Â capacity, forceActiveChecksOnStart := getPluginOptions(agent.Options.Plugins[metric.Plugin.Name()], metric.Plugin.Name()) - Â Â Â Â Â Â Â Â Â Â Â if capacity > metric.Plugin.Capacity() { - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â log.Warningf("lowering the plugin %s capacity to %d as the configured capacity %d exceeds limits", - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â metric.Plugin.Name(), metric.Plugin.Capacity(), capacity) + Â Â Â Â Â Â Â Â Â Â Â if metric.Plugini.Name() == "ZabbixSync" { Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â capacity = metric.Plugin.Capacity() + Â Â Â Â Â Â Â Â Â Â Â } else { + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if capacity > metric.Plugin.Capacity() { + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â log.Warningf("lowering the plugin %s capacity to %d as the configured capacity %d exceeds limits", + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â metric.Plugin.Name(), metric.Plugin.Capacity(), capacity) + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â capacity = metric.Plugin.Capacity() + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â }