[ZBX-21223] Parameter ControlSocket cannot be redefined in zabbix_agent2.d/*.conf Created: 2022 Jun 19 Updated: 2026 Mar 23 Resolved: 2026 Mar 23 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Agent2 plugin (G) |
| Affects Version/s: | 6.0.5 |
| Fix Version/s: | None |
| Type: | Problem report | Priority: | Trivial |
| Reporter: | v99glu | Assignee: | Zabbix Support Team |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 20.04 with official Zabbix Apt Repo |
||
| Description |
|
Steps to reproduce:
Result: |
| Comments |
| Comment by v99glu [ 2022 Jun 19 ] |
|
Obviously I can comment out ControlSocket= in zabbix_agent2.conf and everything will become OK but this file is a part of package and shouldn't be altered by user without a good reason. |
| Comment by Vladimir Stepanov (Inactive) [ 2022 Jun 21 ] |
|
Thank you for reporting the issue! Handled over developers for fixing. |
| Comment by Igor Gorbach (Inactive) [ 2022 Jun 21 ] |
|
General Zabbix parameters like ListenPort, ControlSocket,ListenIP - if they should be re-defined in the included file - should be commented into the general configuration file - there is no bug |
| Comment by v99glu [ 2022 Jun 26 ] |
|
OK, lets experiment. Content of /run/za2/zabbix_agent2.d/agent.conf: Run agent2 from command line: As we see agent2 cannot start because distributive zabbix-agent2.service is running and listening on /tmp/agent.sock. Now put ControlSocket= before Include= in /run/za2/zabbix_agent2.conf: Run agent2 from command line: Voila, ControlSocket successfully overridden and we don't need to comment out ControlSocket= in base configuration. I remember that when I tried to do so with Zabbix Agent 4.0, it didn't allow such overriding. And I was happy endlessly when noted that Zabbix Agent2 5.0+ did. Now from your words "Zabbix ... defines parameters once only" I can conclude - it is a bug rather than longly awaited feature, isn't it. |
| Comment by Paul Donohue [ 2025 Jun 03 ] |
|
As an (ugly) work-around, you can put your config under /etc/zabbix/zabbix_agent2.d/plugins.d/ instead of /etc/zabbix/zabbix_agent2.d/ ... Or put a symlink to your config under plugins.d/ (which will cause your config to be loaded twice, although that should be harmless). |
| Comment by Petro Sklyar [ 2026 Mar 23 ] |
|
Ticket marked as fixed/closed, unsupported version. |