[ZBXNEXT-5570] Change Agent2 plugin configuration Created: 2019 Oct 16  Updated: 2024 Apr 10  Resolved: 2020 Aug 31

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G)
Affects Version/s: 4.4.0
Fix Version/s: 4.4.2rc1, 5.0.0alpha1, 5.0 (plan)

Type: Change Request Priority: Trivial
Reporter: Andris Zeila Assignee: Vadim Ipatov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File coverage.png    
Issue Links:
Sub-task
part of ZBXNEXT-5428 Create Redis agent plugin Closed
part of ZBX-16820 Remote commands do not work on zabbix... Closed
Epic Link: Zabbix Agent2 (Golang for 5.0)
Team: Team INT
Sprint: Sprint 57 (Oct 2019), Sprint 58 (Nov 2019), Sprint 59 (Dec 2019), Sprint 60 (Jan 2020), Sprint 61 (Feb 2020), Sprint 62 (Mar 2020), Sprint 63 (Apr 2020), Sprint 64 (May 2020), Sprint 65 (Jun 2020), Sprint 66 (Jul 2020), Sprint 67 (Aug 2020)
Story Points: 2

 Description   

Currently plugin Configure interface accepts string map of key=value pairs taken directly from the Plugins.<name> configuration parameter.

There are several drawbacks with this approach:

  • complex configuration can be supported only by encoding it into key names
  • to access common parameters (timeout) plugin must directly access global agent configuration
  • no built in (through tags) validation, default values

 

The idea is to change Configure parameter to interface{} which plugin would unmarshal into own configuration structure using Unmarshal method from conf package.

The parameter would contain a tree structure of configuration nodes (something like this is already used by configuration parser internally), but it would be better to hide the internal implementation by passing interface{}. All common parameters would be added to this tree structure under Common node.

Plugins would need to define their own options structure and embed the common options structure:

type Options struct {
   conf.Common
   // plugin options
}

 



 Comments   
Comment by Andris Zeila [ 2019 Nov 14 ]

Released ZBXNEXT-5570 in:

  • pre-4.4.2rc1 336012a9a2
  • pre-5.0.0alpha1 5151c9b9ee
Comment by Marina Generalova [ 2020 Jun 12 ]

Updated documentation to reflect recent decision about removing global plugin authentication parameters:

  • Plugins in 5.0, 5.2
  • Daemon configuration -> Zabbix agent 2 (UNIX) in 5.0, 5.2
  • Daemon configuration -> Zabbix agent 2 (Windows) in 5.0, 5.2
Generated at Fri Jan 10 14:53:32 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.