but GET /api/netsnmp/general/get on 26.7 shows the plugin's model has exactly these fields: enabled, community, syslocation, syscontact, l3visibility, versionoid, enableagentx, enableobservium, listen.
contact / location are syscontact / syslocation.
sysobjid and bindip do not exist.
listen is a multi-select; the API takes it as a comma-separated string, not the dict shape get returns.
Older releases ignored unknown keys silently, so contact and location were never written; 26.x refuses the request.
Also broken, hidden behind the 500
The step always sends contact and location, as "" when the caller gives none. With the field names corrected it would blank a sysContact/sysLocation the operator set.
Fix
Send only fields the model has, under its names, and contact/location only when the caller gives them.
listen as a string; "" (no address selected) for a DNS name, which means every address, as before.
Priority: P2 (the SNMP agent setup fails on every OPNsense 26.x firewall).
## What
`configure_snmp_agent()` fails at the configure step against OPNsense 26.7:
```
[install] os-net-snmp already installed
[configure] 500 Server Error: Internal Server Error for url: https://<firewall>/api/netsnmp/general/set
```
## Why
`_write_snmp_agent_config` posts
```json
{"general": {"enabled": "1", "community": "…", "contact": "", "location": "",
"sysobjid": "", "bindip": "", "listen": {"<address>": {"selected": 1}}}}
```
but `GET /api/netsnmp/general/get` on 26.7 shows the plugin's model has exactly these fields:
`enabled, community, syslocation, syscontact, l3visibility, versionoid, enableagentx, enableobservium, listen`.
- `contact` / `location` are `syscontact` / `syslocation`.
- `sysobjid` and `bindip` do not exist.
- `listen` is a multi-select; the API takes it as a comma-separated string, not the dict shape `get` returns.
Older releases ignored unknown keys silently, so contact and location were never written; 26.x refuses the request.
## Also broken, hidden behind the 500
The step always sends contact and location, as `""` when the caller gives none. With the field names corrected it would blank a sysContact/sysLocation the operator set.
## Fix
- Send only fields the model has, under its names, and contact/location only when the caller gives them.
- `listen` as a string; `""` (no address selected) for a DNS name, which means every address, as before.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Priority: P2 (the SNMP agent setup fails on every OPNsense 26.x firewall).
What
configure_snmp_agent()fails at the configure step against OPNsense 26.7:Why
_write_snmp_agent_configpostsbut
GET /api/netsnmp/general/geton 26.7 shows the plugin's model has exactly these fields:enabled, community, syslocation, syscontact, l3visibility, versionoid, enableagentx, enableobservium, listen.contact/locationaresyscontact/syslocation.sysobjidandbindipdo not exist.listenis a multi-select; the API takes it as a comma-separated string, not the dict shapegetreturns.Older releases ignored unknown keys silently, so contact and location were never written; 26.x refuses the request.
Also broken, hidden behind the 500
The step always sends contact and location, as
""when the caller gives none. With the field names corrected it would blank a sysContact/sysLocation the operator set.Fix
listenas a string;""(no address selected) for a DNS name, which means every address, as before.