.. _vyos.rest.vyos_snmp_server_module:
**************************
vyos.rest.vyos_snmp_server
**************************
**Manage SNMP server configuration on VyOS devices using REST API**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- Manages SNMP server configuration on VyOS devices via the REST API.
- Supports communities, listen addresses, contact/location/description, trap target, and SNMPv3 (engine ID, groups, users, views).
- Uses REST API (``connection=httpapi``) instead of CLI.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
dictionary
|
|
SNMP server configuration.
|
|
communities
list
/ elements=dictionary
|
|
SNMP community configuration.
|
|
|
authorization_type
string
|
|
Authorization type (ro=read-only, rw=read-write).
|
|
|
clients
list
/ elements=string
|
|
IP addresses of SNMP clients allowed to contact the system.
|
|
|
name
string
/ required
|
|
Community name.
|
|
|
networks
list
/ elements=string
|
|
Subnets of SNMP clients allowed to contact the system.
|
|
contact
string
|
|
Contact person for the system.
|
|
description
string
|
|
System description.
|
|
listen_addresses
list
/ elements=dictionary
|
|
IP addresses to listen for incoming SNMP requests.
|
|
|
address
string
/ required
|
|
IP address to listen on.
|
|
|
port
integer
|
|
UDP port (default 161).
|
|
location
string
|
|
System location.
|
|
smux_peer
string
|
|
Register a subtree for SMUX-based processing.
|
|
snmp_v3
dictionary
|
|
SNMPv3 configuration.
|
|
|
engine_id
string
|
|
EngineID as a hex string.
|
|
|
groups
list
/ elements=dictionary
|
|
SNMPv3 group configuration.
|
|
|
|
group
string
/ required
|
|
Group name.
|
|
|
|
mode
string
|
|
Access mode (ro=read-only, rw=read-write).
|
|
|
|
seclevel
string
|
|
Minimum security level required for group members.
|
|
|
|
view
string
|
|
View name the group has access to.
|
|
|
trap_targets
list
/ elements=dictionary
|
|
SNMPv3 trap target configuration.
|
|
|
|
address
string
|
|
IP address of the SNMPv3 trap target.
|
|
|
|
authentication
dictionary
|
|
Authentication parameters for trap target.
|
|
|
|
|
encrypted_key
string
|
|
Encrypted authentication key.
|
|
|
|
|
plaintext_key
string
|
|
Plaintext authentication key.
|
|
|
|
|
type
string
|
|
Authentication algorithm.
|
|
|
|
port
integer
|
|
UDP port on the trap target host.
|
|
|
|
privacy
dictionary
|
|
Privacy parameters for trap target.
|
|
|
|
|
encrypted_key
string
|
|
Encrypted privacy key.
|
|
|
|
|
plaintext_key
string
|
|
Plaintext privacy key.
|
|
|
|
|
type
string
|
|
Privacy algorithm.
|
|
|
|
protocol
string
|
|
Transport protocol for traps.
|
|
|
|
type
string
|
|
Trap type.
|
|
|
users
list
/ elements=dictionary
|
|
SNMPv3 user configuration.
|
|
|
|
authentication
dictionary
|
|
Authentication parameters for this user.
|
|
|
|
|
encrypted_key
string
|
|
Encrypted authentication key (stored as encrypted-password on device).
|
|
|
|
|
plaintext_key
string
|
|
Plaintext authentication key (device encrypts it).
|
|
|
|
|
type
string
|
|
Authentication algorithm.
|
|
|
|
group
string
|
|
Group this user belongs to.
|
|
|
|
mode
string
|
|
Access mode for this user.
|
|
|
|
privacy
dictionary
|
|
Privacy (encryption) parameters for this user.
|
|
|
|
|
encrypted_key
string
|
|
Encrypted privacy key.
|
|
|
|
|
plaintext_key
string
|
|
Plaintext privacy key (device encrypts it).
|
|
|
|
|
type
string
|
|
Privacy algorithm.
|
|
|
|
tsm_key
string
|
|
TSM fingerprint of the certificate mapped to this user.
|
|
|
|
user
string
/ required
|
|
Username.
|
|
|
views
list
/ elements=dictionary
|
|
SNMPv3 view configuration.
|
|
|
|
exclude
string
|
|
OID subtree excluded from this view.
|
|
|
|
mask
string
|
|
OID mask for the view.
|
|
|
|
oid
string
|
|
OID subtree included in this view.
|
|
|
|
view
string
/ required
|
|
View name.
|
|
trap_source
string
|
|
SNMP trap source address.
|
|
trap_target
dictionary
|
|
SNMP trap target.
|
|
|
address
string
|
|
IP address of the trap target host.
|
|
|
community
string
|
|
Community name to use for traps.
|
|
|
port
integer
|
|
UDP port on the trap target host.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- gathered
|
Desired state of SNMP configuration.
|