Configuring SNMP
The Simple Network Management Protocol (SNMP) is an application-layer protocol that provides a message format for communication between SNMP managers and agents. SNMP provides a standardized framework and a common language used for the monitoring and management of devices in a network.
This section contains payload examples and CLIs to demonstrate how to use the NX-API REST API to configure SNMP on Cisco Nexus 3000 and 9000 Series switches and to show how the REST APIs correspond to the CLI commands.
For more information, see the Cisco Nexus 9000 Series NX-OS System Management Configuration Guide.
Configuring Local SNMP Users
Configuring Local SNMP Users
POST http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpLocalUser": {
"attributes": {
"authpwd": "Cisco@123",
"authtype": "md5",
"isenforcepriv": "yes",
"islocalizedkey": "no",
"privpwd": "Cisco@123",
"privtype": "des",
"userName": "user1"
},
"children": [
{
"snmpUserGroup": {
"attributes": {
"groupName": "network-admin"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<lclUser-items>
<LocalUser-list>
<userName>user1</userName>
<authpwd>Cisco@123</authpwd>
<authtype>md5</authtype>
<isenforcepriv>true</isenforcepriv>
<islocalizedkey>false</islocalizedkey>
<privpwd>Cisco@123</privpwd>
<privtype>des</privtype>
<group-items>
<UserGroup-list>
<groupName>network-admin</groupName>
</UserGroup-list>
</group-items>
</LocalUser-list>
</lclUser-items>
</inst-items>
</snmp-items>
</System>
Configures an SNMP user with authentication and privacy parameters.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right.
snmp-server user user1 auth md5 Cisco@123 priv Cisco@123 localizedkey
snmp-server user user1 enforcePriv
snmp-server user user1 network-admin
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpLocalUser | sys/snmp/inst/lclUser-{userName} |
snmpUserGroup | sys/snmp/inst/lclUser-{userName}/group-{groupName} |
snmpLocalUser Properties
The following table contains information about the snmpLocalUser properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
authpwd | snmp:AuthPasswd (string:Basic) | Auth Password | MAX SIZE: 130 |
authtype | snmp:AuthTypeT (scalar:Enum8) | Auth Protocol Type | SELECTION: 0 - no 1 - md5 2 - sha DEFAULT: no |
isenforcepriv | scalar:Bool | whether enforce priv con | SELECTION: true or false |
islocalizedkey | scalar:Bool | whether localized key configured | SELECTION: true or false |
privpwd | snmp:PrivPasswd (string:Basic) | Priv Password | MAX SIZE: 130 |
privtype | snmp:PrivTypeT (scalar:Enum8) | Priv Protocol Type | SELECTION: 0 - no 1 - des 2 - aes128 DEFAULT: no |
userName | snmp:userNameT (string:Basic) | snmp-server user name | A sequence of characters |
snmpUserGroup Properties
The following table contains information about the snmpUserGroup properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
groupName | snmp:userNameT (string:Basic) | snmp-server user name | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring Local SNMP Users Using Type 6 Encription
Configuring Local SNMP Users Using Type 6 Encription
POST http://<IP_Address>/api/mo/sys/snmp/inst.json
"snmpLocalUser": {
"attributes": {
"authpwd": " JDYkDdY3pD0i3uJSgLHTluHNfCSqGYI1Wq67KSnQ8iq3Wh/6JF2ibS7jzU+DlEJzJ/7KRdSB39KdAA== ",
"authtype": "sha-256",
"childAction": "",
"dn": "sys/snmp/inst/lclUser-rajiv",
"ipv4AclName": "",
"ipv6AclName": "",
"isenforcepriv": "no",
"islocalizedV2key": "yes",
"islocalizedkey": "no",
"modTs": "2022-07-26T04:58:28.151+00:00",
"privpwd": " JDYkDdY3pD0i3uJSgLHTluHNfCSqGYI1Wq67KSnQ8iq3Wh/6JF2ibS7jzU+DlEJzJ/7KRdSB39KdAA== ",
"privtype": "aes128",
"pwd_type": "6",
"status": "",
"userName": "rajiv",
"usrengineId": "",
"usrengineIdlen": "0"
},
{
imdata:[]
}
<System>
xxxx
</System>
Configures an SNMP user with authentication and privacy parameters.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right.
snmp-server user name [pwd_type 6] [auth {md5 | sha | sha-224 | sha-256 | sha-384 | sha-512} passphrase [auto] [priv [aes-128] passphrase] [engineID id] [localizedkey | localizedV2key]]
Note: The property information for this example was added in Release 10.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpLocalUser | sys/snmp/inst/lclUser-{userName} |
snmpLocalUser Properties
The following table contains information about the snmpLocalUser properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
.Property Name | Data Type | Description | Values |
---|---|---|---|
authtype | snmp:AuthTypeT, | Auth Protocol Type | Selection: 0, 1, 2, 3, 4, 5, 6 |
snmpUserGroup Properties
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring SNMP Users Using AES-256 Privacy Protocol
Configuring SNMP Users Using AES-256 Privacy Protocol
{
"topSystem": {
"children": [
{
"snmpEntity": {
"children": [
{
"snmpInst": {
"children": [
{
"snmpLocalUser": {
"attributes": {
"authpwd": "Cisc0123",
"authtype": "sha-512",
"islocalizedV2key": "no",
"islocalizedkey": "no",
"privpwd": "Cisc0123",
"privtype": "aes256",
"pwd_type": "0",
"userName": "rest123"
}
}
}
]
}
}
]
}
]
}
}
{
imdata:[]
}
CLI Command
The CLI command below is the equivalent of the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
snmp-server user name [pwd_type 6] [auth {md5 | sha | sha-224 | sha-256 | sha-384 | sha-512} passphrase [auto][priv [aes-128] [aes-256] passphrase] [engineID id] [localizedkey] | [localizedV2key]]
Note: The property information for this example was added in Release 10.5(2).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
lclUser | sys/snmp/inst/lclUser- |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring Remote SNMP Users
Configuring Remote SNMP Users
POST http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpRemoteUser": {
"attributes": {
"authpwd": "Cisco@123",
"authtype": "md5",
"islocalizedkey": "yes",
"privpwd": "Cisco@123",
"privtype": "des",
"userName": "user2",
"usrengineId": "1:2:3:4:5:6:7:8",
"usrengineIdlen": "15"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<rmtUser-items>
<RemoteUser-list>
<userName>user2</userName>
<usrengineId>1:2:3:4:5:6:7:8</usrengineId>
<authpwd>Cisco@123</authpwd>
<authtype>md5</authtype>
<islocalizedkey>true</islocalizedkey>
<privpwd>Cisco@123</privpwd>
<privtype>des</privtype>
<usrengineIdlen>15</usrengineIdlen>
</RemoteUser-list>
</rmtUser-items>
</inst-items>
</snmp-items>
</System>
Configures an SNMP user.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server user user2 auth md5 Cisco@123 priv Cisco@123 localizedkey engineID 1:2:3:4:5:6:7:8
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpRemoteUser | sys/snmp/inst/rmtUser-{userName}-engId-{usrengineId} |
snmpRemoteUser Properties
The following table contains information about the snmpRemoteUser properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
authpwd | snmp:AuthPasswd (string:Basic) | Auth Password | MAX SIZE: 130 |
authtype | snmp:AuthTypeT (scalar:Enum8) | Auth Protocol Type | SELECTION: 0 - no 1 - md5 2 - sha DEFAULT: no |
islocalizedkey | scalar:Bool | whether localized key configured | SELECTION: true or false |
privpwd | snmp:PrivPasswd (string:Basic) | Priv Password | MAX SIZE: 130 |
privtype | snmp:PrivTypeT (scalar:Enum8) | Priv Protocol Type | SELECTION: 0 - no 1 - des 2 - aes128 DEFAULT: no |
userName | snmp:userNameT (string:Basic) | snmp-server user name | A sequence of characters |
usrengineId | snmp:EngId (string:Basic) | Configured Engine Id | A sequence of characters |
usrengineIdlen | snmp:EngIdLen (scalar:UByte) | Configured Engine Id len | RANGE: [0 , 162] DEFAULT: 0 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Creating SNMP Communities
You can create SNMP communities for SNMPv1 or SNMPv2c.
Setting SNMP Community Access Rights to Read Only
Setting SNMP Community Access Rights to Read Only
POST http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpCommSecP": {
"attributes": {
"commAcess": "ro",
"grpName": "",
"name": "comm1"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<community-items>
<CommSecP-list>
<name>comm1</name>
<commAcess>ro</commAcess>
<grpName></grpName>
</CommSecP-list>
</community-items>
</inst-items>
</snmp-items>
</System>
Sets the access rights to read-only.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server community comm1 ro
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpCommSecP | sys/snmp/inst/community-{[name]} |
snmpCommSecP Properties
The following table contains information about the snmpCommSecP properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
commAcess | snmp:CommAcessT (scalar:Enum8) | SNMP community group | SELECTION: 0 - ro 1 - rw 2 - unspecified DEFAULT: unspecified |
grpName | snmp:GrpNameT (string:Basic) | SNMP community group | A sequence of characters |
name | pol:ObjName (naming:Name256) | Object name | MAX SIZE: 64 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Setting SNMP Community Access Rights of the Specified Group
Setting SNMP Community Access Rights of the Specified Group
POST http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpCommSecP": {
"attributes": {
"commAcess": "unspecified",
"grpName": "group1",
"name": "comm1"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<community-items>
<CommSecP-list>
<name>comm1</name>
<commAcess>unspecified</commAcess>
<grpName>group1</grpName>
</CommSecP-list>
</community-items>
</inst-items>
</snmp-items>
</System>
Uses the access rights of the specified group.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server community comm1 group group1
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpCommSecP | sys/snmp/inst/community-{[name]} |
snmpCommSecP Properties
The following table contains information about the snmpCommSecP properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
commAcess | snmp:CommAcessT (scalar:Enum8) | SNMP community group | SELECTION: 0 - ro 1 - rw 2 - unspecified DEFAULT: unspecified |
grpName | snmp:GrpNameT (string:Basic) | SNMP community group | A sequence of characters |
name | pol:ObjName (naming:Name256) | Object name | MAX SIZE: 64 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Assigning an ACL to Filter SNMP Requests
Assigning an ACL to Filter SNMP Requests
POST http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpCommSecP": {
"attributes": {
"name": "ComName1"
},
"children": [
{
"snmpAcl": {
"attributes": {
"useAclName": "",
"useIpv4AclName": "IPV4Name1",
"useIpv6AclName": "IPV6Name1"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<community-items>
<CommSecP-list>
<name>ComName1</name>
<acl-items>
<useAclName>ACLName1</useAclName>
<useIpv4AclName>IPV4Name1</useIpv4AclName>
<useIpv6AclName>IPV6Name1</useIpv6AclName>
</acl-items>
</CommSecP-list>
</community-items>
</inst-items>
</snmp-items>
</System>
Assigns an ACL to filter SNMP requests.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server community ComName1 use-ipv4acl IPV4Name1 use-ipv6acl IPV6Name1
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpCommSecP | sys/snmp/inst/community-{[name]} |
snmpAcl | sys/snmp/inst/community-{[name]}/acl |
snmpCommSecP Properties
The following table contains information about the snmpCommSecP properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
name | pol:ObjName (naming:Name256) | Object name | MAX SIZE: 64 |
snmpAcl Properties
The following table contains information about the snmpAcl properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
useAclName | snmp:AclNameT (string:Basic) | SNMP community acl name | A sequence of characters |
useIpv4AclName | snmp:AclNameT (string:Basic) | SNMP community acl name | A sequence of characters |
useIpv6AclName | snmp:AclNameT (string:Basic) | SNMP community acl name | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring a Source Interface for SNMP Notifications
You can configure SNMP to use the IP address of an interface as the source IP address for notifications. When a notification is generated, its source IP address is based on the IP address of this configured interface.
You can configure a source interface as follows:
- All notifications sent to all SNMP notification receivers.
- All notifications sent to a specific SNMP notification receiver. This configuration overrides the global source interface configuration.
Configuring a Source Interface for SNMP Notifications
POST http://<IP_Address>/api/mo/sys/snmp/inst/globals.json
{
"snmpGlobals": {
"children": [
{
"snmpSourceInterfaceInforms": {
"attributes": {
"ifname": "eth1/1"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<globals-items>
<srcInterfaceInforms-items>
<ifname>eth1/1</ifname>
</srcInterfaceInforms-items>
</globals-items>
</inst-items>
</snmp-items>
</System>
Configures a source interface for sending out SNMPv2 informs.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server source-interface inform ethernet 1/1
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpGlobals | sys/snmp/inst/globals |
snmpSourceInterfaceInforms | sys/snmp/inst/globals/srcInterfaceInforms |
snmpSourceInterfaceInforms Properties
The following table contains information about the snmpSourceInterfaceInforms properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ifname | nw:IfId (base:IfIndex) | Source interface name for informs | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring a Source Interface for Sending SNMPv2 Traps
Configuring a Source Interface for Sending SNMPv2 Traps
POST http://<IP_Address>/api/mo/sys/snmp/inst/globals.json
{
"snmpGlobals": {
"children": [
{
"snmpSourceInterfaceTraps": {
"attributes": {
"ifname": "eth1/1"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<globals-items>
<srcInterfaceTraps-items>
<ifname>eth1/1</ifname>
</srcInterfaceTraps-items>
</globals-items>
</inst-items>
</snmp-items>
</System>
Configures a source interface for sending out SNMPv2 informs.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server source-interface traps ethernet 1/1
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpGlobals | sys/snmp/inst/globals |
snmpSourceInterfaceTraps | sys/snmp/inst/globals/srcInterfaceTraps |
snmpSourceInterfaceTraps Properties
The following table contains information about the snmpSourceInterfaceTraps properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ifname | nw:IfId (base:IfIndex) | Source interface name for Traps | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring SNMP Global Settings
Configuring SNMP Global Settings
POST http://<IP_Address>/api/mo/sys/snmp/inst/globals.json
{
"snmpGlobals": {
"attributes": {
"aaaUserCacheTimeout": "86400",
"counterCacheTimeout": "10",
"protocolEnable": "no",
"tcpSessionAuth": "no"
}
}
}
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpGlobals | sys/snmp/inst/globals |
snmpGlobals Properties
The following table contains information about the snmpGlobals properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
aaaUserCacheTimeout | snmp:AaaUserCacheTimeout (scalar:Uint32) | Timeout for AAA Cache | RANGE: [1 , 86400] DEFAULT: 3600 |
counterCacheTimeout | snmp:CounterCacheTimeout (scalar:Uint16) | Timeout for port stats cache | RANGE: [1 , 3600] DEFAULT: 50 |
protocolEnable | snmp:Boolean (scalar:Enum8) | Enable/Disable snmp protocol operations | SELECTION: 0 - no 1 - yes DEFAULT: yes |
tcpSessionAuth | snmp:tcpSessionAuthT (scalar:Enum8) | tcp-session auth config | SELECTION: 0 - no 1 - tcpSess 2 - tcpSessAuth DEFAULT: tcpSessAuth |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring SNMP System Information
Configuring SNMP System Information
POST http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpSysInfo": {
"attributes": {
"sysContact": "Admin",
"sysLocation": "Lab-7"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<sysinfo-items>
<sysContact>Admin</sysContact>
<sysLocation>Lab-7</sysLocation>
</sysinfo-items>
</inst-items>
</snmp-items>
</System>
Assigns the device contact information.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server contact Admin
snmp-server location Lab-7
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpSysInfo | sys/snmp/inst/sysinfo |
snmpSysInfo Properties
The following table contains information about the snmpSysInfo properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
sysContact | snmp:SnmpSysContact (string:Basic) | System Contact | A sequence of characters |
sysLocation | snmp:SnmpSysLoc (string:Basic) | System Location | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Silently Drop Unknown v3 User Packets
Silently Drop Unknown v3 User Packets
POST http://<mgmt0_IP>/api/mo/sys/snmp.json
{
"snmpEntity": {
"children": [
{
"snmpInst": {
"attributes": {
"unknownUser": "yes"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<unknownUser>yes</unknownUser>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.2(4).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server drop unknown-user
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpInst | sys/snmp/inst |
snmpInst Properties
The following table contains information about the snmpInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
unknownUser | snmp:Boolean (scalar:Enum8) | Indicates the Unknown User MO thats needs to be created | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpInst | sys/snmp/inst |
snmpInst Properties
The following table contains information about the snmpInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
unknownUser | snmp:Boolean (scalar:Enum8) | Indicates the Unknown User MO thats needs to be created | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Do Not Silently Drop Unknown v3 User Packets
Do Not Silently Drop Unknown v3 User Packets
POST http://<mgmt0_IP>/api/mo/sys/snmp.json
{
"snmpEntity": {
"children": [
{
"snmpInst": {
"attributes": {
"unknownUser": "no"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<unknownUser>no</unknownUser>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.2(4).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server drop unknown-user
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpInst | sys/snmp/inst |
snmpInst Properties
The following table contains information about the snmpInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
unknownUser | snmp:Boolean (scalar:Enum8) | Indicates the Unknown User MO thats needs to be created | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpInst | sys/snmp/inst |
snmpInst Properties
The following table contains information about the snmpInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
unknownUser | snmp:Boolean (scalar:Enum8) | Indicates the Unknown User MO thats needs to be created | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Silently Drop Unknown v3 Engine Id
Silently Drop Unknown v3 Engine Id
POST http://<mgmt0_IP>/api/mo/sys/snmp.json
{
"snmpEntity": {
"children": [
{
"snmpInst": {
"attributes": {
"unknownEngId": "yes"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<unknownEngId>yes</unknownEngId>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.2(4).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server drop unknown-engine-id
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpInst | sys/snmp/inst |
snmpInst Properties
The following table contains information about the snmpInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
unknownEngId | snmp:Boolean (scalar:Enum8) | Indicates the Unknown Engine Id MO thats needs to be created | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpInst | sys/snmp/inst |
snmpInst Properties
The following table contains information about the snmpInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
unknownEngId | snmp:Boolean (scalar:Enum8) | Indicates the Unknown Engine Id MO thats needs to be created | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Do Not Silently Drop Unknown v3 Engine Id
Do Not Silently Drop Unknown v3 Engine Id
POST http://<mgmt0_IP>/api/mo/sys/snmp.json
{
"snmpEntity": {
"children": [
{
"snmpInst": {
"attributes": {
"unknownEngId": "no"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<unknownEngId>no</unknownEngId>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.2(4).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server drop unknown-engine-id
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpInst | sys/snmp/inst |
snmpInst Properties
The following table contains information about the snmpInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
unknownEngId | snmp:Boolean (scalar:Enum8) | Indicates the Unknown Engine Id MO thats needs to be created | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpInst | sys/snmp/inst |
snmpInst Properties
The following table contains information about the snmpInst properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
unknownEngId | snmp:Boolean (scalar:Enum8) | Indicates the Unknown Engine Id MO thats needs to be created | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring Topology Associated with the SNMP Context
Configuring Topology Associated with the SNMP Context
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpCtx": {
"attributes": {
"ctxInstance": "SampleString_123",
"ctxTopology": "SampleString_123",
"name": "SampleString_123",
"vrf": "SampleString_123"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<ctx-items>
<Ctx-list>
<name>SampleString_123</name>
<ctxInstance>SampleString_123</ctxInstance>
<ctxTopology>SampleString_123</ctxTopology>
<vrf>SampleString_123</vrf>
</Ctx-list>
</ctx-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server context SampleString_123 instance SampleString_123 vrf SampleString_123 topology SampleString_123
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpCtx | sys/snmp/inst/ctx-[SampleString_123] |
snmpInst | sys/snmp/inst |
snmpCtx Properties
The following table contains information about the snmpCtx properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ctxInstance | string:Basic | Protocol instance associated with the SNMP context | A sequence of characters |
ctxTopology | string:Basic | Topology associated with the SNMP context | A sequence of characters |
name | pol:ObjName string:Basic | RANGE: Min: "1" Max: "64" | |
vrf | string:Basic | VRF associated with the SNMP context | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring Global Privacy Enforcement for All Users
Configuring Global Privacy Enforcement for All Users
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpGlobals": {
"attributes": {
"enforcePrivacy": "yes"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<globals-items>
<enforcePrivacy>yes</enforcePrivacy>
</globals-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server globalEnforcePriv
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpGlobals | sys/snmp/inst/globals |
snmpInst | sys/snmp/inst |
snmpGlobals Properties
The following table contains information about the snmpGlobals properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
enforcePrivacy | snmp:Boolean (scalar:Enum8) | Globally enforce privacy for all the users | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting Global Privacy Enforcement for All Users
Deleting Global Privacy Enforcement for All Users
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpGlobals": {
"attributes": {
"enforcePrivacy": "no"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<globals-items>
<enforcePrivacy>no</enforcePrivacy>
</globals-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server globalEnforcePriv
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpGlobals | sys/snmp/inst/globals |
snmpInst | sys/snmp/inst |
snmpGlobals Properties
The following table contains information about the snmpGlobals properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
enforcePrivacy | snmp:Boolean (scalar:Enum8) | Globally enforce privacy for all the users | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring the Notification to Host UDP Port Number
Configuring the Notification to Host UDP Port Number
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"commName": "SampleString_123",
"hostName": "HostName",
"notifType": "traps",
"secLevel": "unspecified",
"udpPortID": "1",
"version": "v1"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<commName>SampleString_123</commName>
<notifType>traps</notifType>
<secLevel>unspecified</secLevel>
<version>v1</version>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName SampleString_123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
commName | snmp:commNameT (string:Basic) | community to be associated to the host | A sequence of characters |
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
notifType | snmp:NotificationType (scalar:Enum8) | Ctrl bits indicating traps/informs config | SELECTION: 1 - traps 2 - informs DEFAULT: traps |
secLevel | snmp:V3SecLvl (scalar:Enum8) | Ctrl bits indicating auth/ priv/ noauth for v3 | SELECTION: 0 - unspecified 1 - noauth 2 - auth 3 - priv DEFAULT: unspecified |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
version | snmp:Version (scalar:Enum8) | Ctrl bits indicating version | SELECTION: 1 - v1 2 - v2c 3 - v3 DEFAULT: v1 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring Ethernet Source Interface for Sending SNMP Notifications
Configuring Ethernet Source Interface for Sending SNMP Notifications
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"ifName": "eth1/2"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items>
<ifName>eth1/2</ifName>
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName source-interface ethernet 1/2 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ifName | nw:IfId (base:IfIndex) | Source interface name for host | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting the Notification to Host UDP Port Number (Ethernet Source Interface Sends SNMP Notifications)
Deleting the Notification to Host UDP Port Number (Ethernet Source Interface Sends SNMP Notifications)
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"status": "deleted"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items nc:operation="delete">
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server host HostName source-interface ethernet 1/2 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring VLAN Source Interface for Sending SNMP Notifications
Configuring VLAN Source Interface for Sending SNMP Notifications
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"ifName": "vlan123"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items>
<ifName>vlan123</ifName>
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName source-interface vlan 123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ifName | nw:IfId (base:IfIndex) | Source interface name for host | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting VLAN Source Interface for Sending SNMP Notifications
Deleting VLAN Source Interface for Sending SNMP Notifications
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"status": "deleted"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items nc:operation="delete">
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server host HostName source-interface vlan 123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring Port Channel Source Interface for Sending SNMP Notifications
Configuring Port Channel Source Interface for Sending SNMP Notifications
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"ifName": "po123"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items>
<ifName>po123</ifName>
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName source-interface port-channel 123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ifName | nw:IfId (base:IfIndex) | Source interface name for host | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting Port Channel Source Interface for Sending SNMP Notifications
Deleting Port Channel Source Interface for Sending SNMP Notifications
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"status": "deleted"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items nc:operation="delete">
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server host HostName source-interface port-channel 123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring Loopback Source Interface for Sending SNMP Notifications
Configuring Loopback Source Interface for Sending SNMP Notifications
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"ifName": "lo123"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items>
<ifName>lo123</ifName>
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName source-interface loopback 123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ifName | nw:IfId (base:IfIndex) | Source interface name for host | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting Loopback Source Interface for Sending SNMP Notifications
Deleting Loopback Source Interface for Sending SNMP Notifications
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"status": "deleted"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items nc:operation="delete">
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server host HostName source-interface loopback 123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring to Filter Notifications to the Notification Host Receiver Based on the Configured VRF
Configuring to Filter Notifications to the Notification Host Receiver Based on the Configured VRF
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpFilterVrf": {
"attributes": {
"vrfName": "SampleString_123"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<filtervrf-items>
<FilterVrf-list>
<vrfName>SampleString_123</vrfName>
</FilterVrf-list>
</filtervrf-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName filter-vrf SampleString_123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpFilterVrf | sys/snmp/inst/host-hostName-udp-1/filtervrf-[SampleString_123] |
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpInst | sys/snmp/inst |
snmpFilterVrf Properties
The following table contains information about the snmpFilterVrf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
vrfName | l3:VrfName (string:Basic) | VRF name to be used by host | A sequence of characters |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting the Config to Filter Notifications to the Notification Host Receiver Based on the Configured VRF
Deleting the Config to Filter Notifications to the Notification Host Receiver Based on the Configured VRF
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpFilterVrf": {
"attributes": {
"status": "deleted",
"vrfName": "SampleString_123"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<filtervrf-items>
<FilterVrf-list nc:operation="delete">
<vrfName>SampleString_123</vrfName>
</FilterVrf-list>
</filtervrf-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server host HostName filter-vrf SampleString_123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpFilterVrf | sys/snmp/inst/host-hostName-udp-1/filtervrf-[SampleString_123] |
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpInst | sys/snmp/inst |
snmpFilterVrf Properties
The following table contains information about the snmpFilterVrf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
vrfName | l3:VrfName (string:Basic) | VRF name to be used by host | A sequence of characters |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring MGMT Source Interface for Sending SNMP Notifications
Configuring MGMT Source Interface for Sending SNMP Notifications
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"ifName": "mgmt0"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items>
<ifName>mgmt0</ifName>
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName source-interface mgmt 0 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ifName | nw:IfId (base:IfIndex) | Source interface name for host | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting MGMT Source Interface for Sending SNMP Notifications
Deleting MGMT Source Interface for Sending SNMP Notifications
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "1"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"status": "deleted"
}}}]}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<hostsourceinterface-items nc:operation="delete">
</hostsourceinterface-items>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server host HostName source-interface mgmt 0 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpHost | sys/snmp/inst/host-hostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-hostName-udp-1/hostsourceinterface |
snmpInst | sys/snmp/inst |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring the Name of the SNMP Context (MIB Access Parameters)
Configuring the Name of the SNMP Context (MIB Access Parameters)
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpCommSecP": {
"attributes": {
"contextName": "SampleString_123",
"name": "SampleString_123"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<community-items>
<CommSecP-list>
<name>SampleString_123</name>
<contextName>SampleString_123</contextName>
</CommSecP-list>
</community-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server mib community-map SampleString_123 context SampleString_123
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpCommSecP | sys/snmp/inst/community-[SampleString_123] |
snmpInst | sys/snmp/inst |
snmpCommSecP Properties
The following table contains information about the snmpCommSecP properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
contextName | string:Basic | Name of the SNMP context | A sequence of characters |
name | pol:ObjName string:Basic | The name of the community security profile | RANGE: 1-32 characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting the Name of the SNMP Context (MIB Access Parameters)
Deleting the Name of the SNMP Context (MIB Access Parameters)
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpCommSecP": {
"attributes": {
"contextName": "",
"name": "SampleString_123"
}}}]}}
{
imdata:[]
}
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server mib community-map SampleString_123 context SampleString_123
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpCommSecP | sys/snmp/inst/community-[SampleString_123] |
snmpInst | sys/snmp/inst |
snmpCommSecP Properties
The following table contains information about the snmpCommSecP properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
contextName | string:Basic | Name of the SNMP context | A sequence of characters |
name | pol:ObjName string:Basic | The name of the community security profile | RANGE: 1-32 characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring IPv4 and IPv6 ACLs for a User SNMP Server
Configuring IPv4 and IPv6 ACLs for a User SNMP Server
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpLocalUser": {
"attributes": {
"ipv4AclName": "SampleString_123",
"ipv6AclName": "SampleString_123",
"userName": "SampleString_123"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<lclUser-items>
<LocalUser-list>
<userName>SampleString_123</userName>
<ipv4AclName>SampleString_123</ipv4AclName>
<ipv6AclName>SampleString_123</ipv6AclName>
</LocalUser-list>
</lclUser-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server user SampleString_123 use-ipv4acl SampleString_123 use-ipv6acl SampleString_123
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpLocalUser | sys/snmp/inst/lclUser-SampleString_123 |
snmpLocalUser Properties
The following table contains information about the snmpLocalUser properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ipv4AclName | string:Basic | IPv4 ACL name to filter SNMP requests | A sequence of characters |
ipv6AclName | string:Basic | IPv6 ACL name to filter SNMP requests | A sequence of characters |
userName | snmp:userNameT (string:Basic) | snmp-server user name | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting IPv4 and IPv6 ACLs for a User SNMP Server
Deleting IPv4 and IPv6 ACLs for a User SNMP Server
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpLocalUser": {
"attributes": {
"ipv4AclName": "",
"ipv6AclName": "",
"userName": "SampleString_123"
}}}]}}
{
imdata:[]
}
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server user SampleString_123 use-ipv4acl SampleString_123 use-ipv6acl SampleString_123
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpLocalUser | sys/snmp/inst/lclUser-SampleString_123 |
snmpLocalUser Properties
The following table contains information about the snmpLocalUser properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ipv4AclName | string:Basic | IPv4 ACL name to filter SNMP requests | A sequence of characters |
ipv6AclName | string:Basic | IPv6 ACL name to filter SNMP requests | A sequence of characters |
userName | snmp:userNameT (string:Basic) | snmp-server user name | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring Filter-VRF for Notification Host
Configuring Filter-VRF for Notification Host
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"topSystem": {
"children": [
{
"snmpEntity": {
"children": [
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"commName": "public",
"hostName": "HostName",
"notifType": "traps",
"secLevel": "noauth",
"udpPortID": "1",
"version": "v1"
},
"children": [
{
"snmpFilterVrf": {
"attributes": {
"vrfName": "SampleString_123"
}
}
}
]
}
},
{
"snmpHost": {
"attributes": {
"commName": "public",
"hostName": "HostName",
"notifType": "traps",
"secLevel": "noauth",
"udpPortID": "162",
"version": "v1"
}
}
}
]
}
}
]
}
}
]
}
}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<commName>public</commName>
<notifType>traps</notifType>
<secLevel>noauth</secLevel>
<version>v1</version>
<filtervrf-items>
<FilterVrf-list>
<vrfName>SampleString_123</vrfName>
</FilterVrf-list>
</filtervrf-items>
</Host-list>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>162</udpPortID>
<commName>public</commName>
<notifType>traps</notifType>
<secLevel>noauth</secLevel>
<version>v1</version>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName public
snmp-server host HostName public udp-port 1
snmp-server host HostName filter-vrf SampleString_123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpHost | sys/snmp/inst/host-HostName-udp-1 |
snmpFilterVrf | sys/snmp/inst/host-HostName-udp-1/filtervrf-[SampleString_123] |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpFilterVrf Properties
The following table contains information about the snmpFilterVrf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
vrfName | l3:VrfName (string:Basic) | VRF name to be used by host | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting Filter-VRF for Notification Host
Deleting Filter-VRF for Notification Host
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"topSystem": {
"children": [
{
"snmpEntity": {
"children": [
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"commName": "public",
"hostName": "HostName",
"notifType": "traps",
"secLevel": "noauth",
"udpPortID": "1",
"version": "v1"
},
"children": [
{
"snmpFilterVrf": {
"attributes": {
"status": "deleted",
"vrfName": "SampleString_123"
}
}
}
]
}
},
{
"snmpHost": {
"attributes": {
"commName": "public",
"hostName": "HostName",
"notifType": "traps",
"secLevel": "noauth",
"udpPortID": "162",
"version": "v1"
}
}
}
]
}
}
]
}
}
]
}
}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<commName>public</commName>
<notifType>traps</notifType>
<secLevel>noauth</secLevel>
<version>v1</version>
<filtervrf-items>
<FilterVrf-list nc:operation="delete">
<vrfName>SampleString_123</vrfName>
</FilterVrf-list>
</filtervrf-items>
</Host-list>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>162</udpPortID>
<commName>public</commName>
<notifType>traps</notifType>
<secLevel>noauth</secLevel>
<version>v1</version>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName public
snmp-server host HostName public udp-port 1
no snmp-server host HostName filter-vrf SampleString_123 udp-port 1
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpHost | sys/snmp/inst/host-HostName-udp-1 |
snmpFilterVrf | sys/snmp/inst/host-HostName-udp-1/filtervrf-[SampleString_123] |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpFilterVrf Properties
The following table contains information about the snmpFilterVrf properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
vrfName | l3:VrfName (string:Basic) | VRF name to be used by host | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring an SNMPv3 User with IPv4/IPv6 ACL
Configuring an SNMPv3 User with IPv4/IPv6 ACL
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpLocalUser": {
"attributes": {
"ipv4AclName": "SampleString_123",
"ipv6AclName": "SampleString_123",
"userName": "SampleString_123"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<lclUser-items>
<LocalUser-list>
<userName>SampleString_123</userName>
<ipv4AclName>SampleString_123</ipv4AclName>
<ipv6AclName>SampleString_123</ipv6AclName>
</LocalUser-list>
</lclUser-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server user SampleString_123 use-ipv4acl SampleString_123 use-ipv6acl SampleString_123
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpLocalUser | sys/snmp/inst/lclUser-SampleString_123 |
snmpLocalUser Properties
The following table contains information about the snmpLocalUser properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ipv4AclName | string:Basic | IPv4 ACL name to filter SNMP requests | A sequence of characters |
ipv6AclName | string:Basic | IPv6 ACL name to filter SNMP requests | A sequence of characters |
userName | snmp:userNameT (string:Basic) | snmp-server user name | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting an SNMPv3 User with IPv4/IPv6 ACL
Deleting an SNMPv3 User with IPv4/IPv6 ACL
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpLocalUser": {
"attributes": {
"ipv4AclName": "",
"ipv6AclName": "",
"userName": "SampleString_123"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<lclUser-items>
<LocalUser-list>
<userName>SampleString_123</userName>
<ipv4AclName></ipv4AclName>
<ipv6AclName></ipv6AclName>
</LocalUser-list>
</lclUser-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server user SampleString_123 use-ipv4acl SampleString_123 use-ipv6acl SampleString_123
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpLocalUser | sys/snmp/inst/lclUser-SampleString_123 |
snmpLocalUser Properties
The following table contains information about the snmpLocalUser properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ipv4AclName | string:Basic | IPv4 ACL name to filter SNMP requests | A sequence of characters |
ipv6AclName | string:Basic | IPv6 ACL name to filter SNMP requests | A sequence of characters |
userName | snmp:userNameT (string:Basic) | snmp-server user name | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring a Source Interface for SNMP Notification Host
Configuring a Source Interface for SNMP Notification Host
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"topSystem": {
"children": [
{
"snmpEntity": {
"children": [
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "162"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"ifName": "eth1/2"
}
}
}
]
}
},
{
"snmpHost": {
"attributes": {
"commName": "public",
"hostName": "HostName",
"notifType": "traps",
"secLevel": "noauth",
"udpPortID": "1",
"version": "v1"
}
}
}
]
}
}
]
}
}
]
}
}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>162</udpPortID>
<hostsourceinterface-items>
<ifName>eth1/2</ifName>
</hostsourceinterface-items>
</Host-list>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<commName>public</commName>
<notifType>traps</notifType>
<secLevel>noauth</secLevel>
<version>v1</version>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName public udp-port 1
snmp-server host HostName source-interface ethernet 1/2
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpHost | sys/snmp/inst/host-HostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-HostName-udp-1/hostsourceinterface |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
ifName | nw:IfId (base:IfIndex) | Source interface name for host | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting a Source Interface for SNMP Notification Host
Deleting a Source Interface for SNMP Notification Host
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"snmpEntity": {
"children": [
{
"snmpInst": {
"children": [
{
"snmpHost": {
"attributes": {
"hostName": "HostName",
"udpPortID": "162"
},
"children": [
{
"snmpHostSrcInterface": {
"attributes": {
"status": "deleted"
}
}
}
]
}
},
{
"snmpHost": {
"attributes": {
"commName": "public",
"hostName": "HostName",
"notifType": "traps",
"secLevel": "noauth",
"udpPortID": "1",
"version": "v1"
}
}
}
]
}
}
]
}
}
]
}
}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<host-items>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>162</udpPortID>
<hostsourceinterface-items nc:operation="delete">
</hostsourceinterface-items>
</Host-list>
<Host-list>
<hostName>HostName</hostName>
<udpPortID>1</udpPortID>
<commName>public</commName>
<notifType>traps</notifType>
<secLevel>noauth</secLevel>
<version>v1</version>
</Host-list>
</host-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server host HostName public udp-port 1
no snmp-server host HostName source-interface ethernet 1/2
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpInst | sys/snmp/inst |
snmpHost | sys/snmp/inst/host-HostName-udp-1 |
snmpHostSrcInterface | sys/snmp/inst/host-HostName-udp-1/hostsourceinterface |
snmpHost Properties
The following table contains information about the snmpHost properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
hostName | snmp:hostNameT (naming:Name) | snmp-server host name | RANGE: [1 , 255] |
udpPortID | snmp:PortIdT (scalar:Uint32) | snmp-server host udp-port | RANGE: [0 , 65535] DEFAULT: 162 |
snmpHostSrcInterface Properties
The following table contains information about the snmpHostSrcInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
status | mo:ModificationStatus (scalar:Bitmask32) | Modification status | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
Configuring the SNMP Server for Reload
Configuring the SNMP Server for Reload
POST http://<mgmt0_IP>/api/mo/sys/snmp.json
{
"snmpEntity": {
"children": [
{
"snmpServerShutdown": {
"attributes": {
"sysShutdown": "yes"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<servershutdown-items>
<sysShutdown>yes</sysShutdown>
</servershutdown-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp-server system-shutdown
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpServerShutdown | sys/snmp/servershutdown |
snmpServerShutdown Properties
The following table contains information about the snmpServerShutdown properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
sysShutdown | snmp:Boolean (scalar:Enum8) | SNMP server system shutdown control | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting the SNMP Server Reload Configuration
Deleting the SNMP Server Reload Configuration
POST http://<mgmt0_IP>/api/mo/sys/snmp.json
{
"snmpEntity": {
"children": [
{
"snmpServerShutdown": {
"attributes": {
"sysShutdown": "no"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<servershutdown-items>
<sysShutdown>no</sysShutdown>
</servershutdown-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp-server system-shutdown
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpEntity | sys/snmp |
snmpServerShutdown | sys/snmp/servershutdown |
snmpServerShutdown Properties
The following table contains information about the snmpServerShutdown properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
sysShutdown | snmp:Boolean (scalar:Enum8) | SNMP server system shutdown control | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Configuring a Long Description for Interface Alias
Configuring a Long Description for Interface Alias
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpGlobals": {
"attributes": {
"enableIfAliasLong": "yes"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<globals-items>
<enableIfAliasLong>yes</enableIfAliasLong>
</globals-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
snmp ifmib ifalias long
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpGlobals | sys/snmp/inst/globals |
snmpInst | sys/snmp/inst |
snmpGlobals Properties
The following table contains information about the snmpGlobals properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
enableIfAliasLong | snmp:Boolean (scalar:Enum8) | Enable long description upto 256 characters for interface alias | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
Deleting a Long Description for Interface Alias
Deleting a Long Description for Interface Alias
POST http://<mgmt0_IP>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpGlobals": {
"attributes": {
"enableIfAliasLong": "no"
}}}]}}
{
imdata:[]
}
<System>
<snmp-items>
<inst-items>
<globals-items>
<enableIfAliasLong>no</enableIfAliasLong>
</globals-items>
</inst-items>
</snmp-items>
</System>
Note: This example was added in Release 9.3(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
no snmp ifmib ifalias long
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
snmpGlobals | sys/snmp/inst/globals |
snmpInst | sys/snmp/inst |
snmpGlobals Properties
The following table contains information about the snmpGlobals properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
enableIfAliasLong | snmp:Boolean (scalar:Enum8) | Enable long description upto 256 characters for interface alias | SELECTION: 0 - no 1 - yes DEFAULT: no |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:
https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide: