Skip to content

net-mgmt/zabbix-proxy: add StartSNMPPollers option - #5644

Open
b-hoffen wants to merge 1 commit into
opnsense:masterfrom
b-hoffen:zabbix-proxy-startsnmppollers
Open

net-mgmt/zabbix-proxy: add StartSNMPPollers option#5644
b-hoffen wants to merge 1 commit into
opnsense:masterfrom
b-hoffen:zabbix-proxy-startsnmppollers

Conversation

@b-hoffen

Copy link
Copy Markdown

Important notices

Before you submit a pull request, we ask you kindly to acknowledge the following:

If AI was used, please disclose:


Describe the problem

StartSNMPPollers is not exposed in the Zabbix Proxy settings form, so it always stays at the Zabbix default of 1. The only way to change it is to edit /usr/local/etc/<variant>/zabbix_proxy.conf by hand, and the plugin regenerates that file on every settings apply, silently discarding the change. Monitoring a larger number of SNMP hosts commonly needs more than one poller.


Describe the proposed solution

Expose the parameter as an optional field, following the same pattern used for StartAgentPollers in #5037:

  • General.xmlstartsnmppollers as an IntegerField, range 0-1000
  • forms/general.xml — "Start SNMP Pollers", next to Start Agent Pollers
  • zabbix_proxy.conf.in — guarded with helpers.exists(...) and != ''

Left empty the field emits nothing, so existing configurations are unaffected.

StartSNMPPollers requires Zabbix >= 7.0 and this template is shared by the zabbix6/zabbix7/zabbix74 variants. This matches the existing StartAgentPollers and MaxConcurrentChecksPerPoller fields, and as the field is empty by default there is no change for zabbix6 users.

Tested on os-zabbix74-proxy 1.17 with zabbix74-proxy 7.4.11:

  • empty field: StartSNMPPollers absent from the generated config, verified with the element present but empty in config.xml, which is the state after any settings save
  • 1001 and non-numeric input rejected by model validation
  • set to 5: StartSNMPPollers=5 generated, proxy starts, five snmp poller processes, no configuration warnings in the proxy log

Related issue

None. This is a small additive change mirroring the existing StartAgentPollers field, so I did not open an issue first — happy to do so if you would prefer.

The parameter was not exposed in the GUI, so it could only be set by
editing zabbix_proxy.conf by hand, which is overwritten whenever the
template is regenerated.  Monitoring many SNMP hosts commonly needs
more than the default of one poller.

The field is optional and omitted from the generated configuration
when left empty, so existing setups are unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant