Agent should report an error and exit on UserParameter configuration entries with same keys

XMLWordPrintable

      Consider next UserParameters entries in agentd config file:

      UserParameter=custom.echo[*],echo $1
      UserParameter=custom.echo[*],echo $1
      UserParameter=custom.echo[*],echo $1
      UserParameter=custom.pgsql.version,psql --version | head -1
      UserParameter=custom.pgsql.version,psql --version | head -1
      UserParameter=custom.pgsql.version,psql --version | head -1

      Let's print available commands:

      $ sbin/zabbix_agentd -p | grep custom
      custom.echo[] [m|ZBX_NOTSUPPORTED]
      custom.echo[] [m|ZBX_NOTSUPPORTED]
      custom.echo[] [m|ZBX_NOTSUPPORTED]
      custom.pgsql.version [t|psql (PostgreSQL) 8.4.7]

      Duplicate Flexible UserParameters are all added as is, Simple UserParameters are replaced. We agreed that for any UserParameter in case of duplicate key an error should be reported and agent exited instantly.

            Assignee:
            dimir
            Reporter:
            dimir
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: