Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21876

Warning message "lowering plugin capacity" when Agent2 starts

XMLWordPrintable

    • Prev.Sprint, S24-W42/43
    • 1.5

      Steps to reproduce:

      1. 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()
      +                               }
       

            kseve Kirils Seve
            BGmot Evgeny Yurchenko
            Team INT
            Votes:
            11 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated: