Configuring RMON Events

You can configure RMON events to associate with RMON alarms. You can reuse the same event with multiple RMON alarms.

For more information, see the Cisco Nexus 9000 Series NX-OS System Management Configuration Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-installation-and-configuration-guides-list.html/

Configuring an RMON Event

Configuring an RMON Event
POST http://<IP_Address>/api/mo/sys/snmp/inst/rmon.json
{
  "snmpRmon": {
    "children": [
      {
        "snmpEvent": {
          "attributes": {
            "description": "",
            "log": "no",
            "num": "1",
            "owner": "",
            "trap": "trap1"
}}}]}}
{
    imdata:[]
}
<System>
  <snmp-items>
    <inst-items>
      <rmon-items>
        <event-items>
          <Event-list>
            <num>1</num>
            <description></description>
            <log>no</log>
            <owner></owner>
            <trap>trap1</trap>
          </Event-list>
        </event-items>
      </rmon-items>
    </inst-items>
  </snmp-items>
</System>

Configures an RMON event. Ensure that you have configured an SNMP user and enabled SNMP notifications.


CLI Commands

The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.

rmon event 1 trap trap1

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.

MODN
snmpRmon sys/snmp/inst/rmon
snmpEvent sys/snmp/inst/rmon/event-{num}


snmpEvent Properties

The following table contains information about the snmpEvent 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 NameData TypeDescriptionValues
descriptionsnmp:DescType
(string:Basic)
rmon event descriptionA sequence of characters
logsnmp:LogEnableType
(scalar:Enum8)
Whether to generate / not log when alarm event is firedSELECTION:
0 - no
1 - yes
DEFAULT: no
numsnmp:EventNum
(scalar:Uint16)
rmon event number
RANGE: [1 , 65535]
ownersnmp:OwnerType
(string:Basic)
rmon event ownerA sequence of characters
trapsnmp:TrapCommType
(string:Basic)
rmon event descriptionA sequence of characters


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

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:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Querying a Pattern to Match (RMON)

Querying a Pattern to Match (RMON)
GET http://<IP_Address>/api/mo/sys/snmp/inst/rmon.json?rsp-subtree=full&rsp-prop-include=config-only
{
"totalCount": "1",
"imdata": [
{
"snmpRmon": {
    "attributes": {
        "dn": "sys/snmp/inst/rmon",
        "persistentOnReload": "true"
},
"children": [
{
"snmpEvent": {
    "attributes": {
        "description": "CRITICAL(2)",
        "log": "yes",
        "num": "2",
        "owner": "PMON@CRITICAL",
        "persistentOnReload": "true",
        "rn": "event-2",
        "trap": "public"
}}},{
"snmpEvent": {
    "attributes": {
        "description": "INFORMATION(5)",
        "log": "yes",
        "num": "5",
        "owner": "PMON@INFO",
        "persistentOnReload": "true",
        "rn": "event-5",
        "trap": "public"
}}},{
"snmpEvent": {
    "attributes": {
        "description": "WARNING(4)",
        "log": "yes",
        "num": "4",
        "owner": "PMON@WARNING",
        "persistentOnReload": "true",
        "rn": "event-4",
        "trap": "public"
}}},{
"snmpEvent": {
    "attributes": {
        "description": "FATAL(1)",
        "log": "yes",
        "num": "1",
        "owner": "PMON@FATAL",
        "persistentOnReload": "true",
        "rn": "event-1",
        "trap": "public"
}}},{
"snmpEvent": {
    "attributes": {
        "description": "ERROR(3)",
        "log": "yes",
        "num": "3",
        "owner": "PMON@ERROR",
        "persistentOnReload": "true",
        "rn": "event-3",
        "trap": "public"
}}}]}}]}
GET http://<IP_Address>/restconf/data/Cisco-NX-OS-device:System/snmp-items/inst-items/rmon-items
<rmon-items>
    <deleteAlarms/>
    <deleteEvents/>
    <event-items>
        <Event-list>
            <num>2</num>
            <description>CRITICAL(2)</description>
            <log>yes</log>
            <owner>PMON@CRITICAL</owner>
            <trap>public</trap>
        </Event-list>
        <Event-list>
            <num>5</num>
            <description>INFORMATION(5)</description>
            <log>yes</log>
            <owner>PMON@INFO</owner>
            <trap>public</trap>
        </Event-list>
        <Event-list>
            <num>4</num>
            <description>WARNING(4)</description>
            <log>yes</log>
            <owner>PMON@WARNING</owner>
            <trap>public</trap>
        </Event-list>
        <Event-list>
            <num>1</num>
            <description>FATAL(1)</description>
            <log>yes</log>
            <owner>PMON@FATAL</owner>
            <trap>public</trap>
        </Event-list>
        <Event-list>
            <num>3</num>
            <description>ERROR(3)</description>
            <log>yes</log>
            <owner>PMON@ERROR</owner>
            <trap>public</trap>
        </Event-list>
    </event-items>
</rmon-items>
CLI Output
switch# show running | section rmon   
rmon event 1 log trap public description FATAL(1) owner PMON@FATAL   
rmon event 2 log trap public description CRITICAL(2) owner PMON@CRITICAL   
rmon event 3 log trap public description ERROR(3) owner PMON@ERROR   
rmon event 4 log trap public description WARNING(4) owner PMON@WARNING   
rmon event 5 log trap public description INFORMATION(5) owner PMON@INFO   

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.

MODN
snmpRmon sys/snmp/inst/rmon
snmpEvent sys/snmp/inst/rmon/event-{num}


snmpRmon Properties

The following table contains information about the snmpRmon 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 NameData TypeDescriptionValues
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
persistentOnReload
mo:Persistent
scalar:Enum8
NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)

  • snmpEvent Properties

    The following table contains information about the snmpEvent 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 NameData TypeDescriptionValues
    descriptionsnmp:DescType
    (string:Basic)
    rmon event descriptionA sequence of characters
    logsnmp:LogEnableType
    (scalar:Enum8)
    Whether to generate / not log when alarm event is firedSELECTION:
    0 - no
    1 - yes
    DEFAULT: no
    numsnmp:EventNum
    (scalar:Uint16)
    rmon event number
    RANGE: [1 , 65535]
    ownersnmp:OwnerType
    (string:Basic)
    rmon event ownerA sequence of characters
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • rn
    reference:BinRN
    Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
    trapsnmp:TrapCommType
    (string:Basic)
    rmon event descriptionA sequence of characters


    Related Documentation

    For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

    http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

    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:

    https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html