This section introduces how to create an SNMP parser to extract key metrics of device data with OIDs.

Example: Parse the free and used memory of a Cisco Router with the corresponding OIDs.

1.Click the icon on the taskbar and select New Parser.

2.Keep the default Legacy Device node type and select Cisco Router from the Device Type list. By default, the All Device Types option is selected.

Tip: The system also supports defining a parser to retrieve and parse SDN data through APIs. See Creating an API Parser to get details about API parser.

3.Select SNMP from the Parser Type drop-down menu.

4.Select an SNMP method (SNMPGet in this sample) from the drop-down menu.

5.Enter the following two OIDs in the Command field and separate them with ||.

Free memory OID:

Used memory OID:

Note: Only the SNMP method SNMPGet supports multiple OID inputs while SNMPWalk and SDNMPTable supports single OID.

6.Highlight the free memory value exactly in the sample data and click Define Keyword in the floating menu. The Keyword Parser dialog prompts with the following fields auto-identified. Click Save Variable.

Sample — the sample command line where the variable stays.

Parser — defines keywords and where a variable is located. The keyword parser GAUGE32: $int:var1$ is created automatically. To locate the variable exactly and differentiate it with the used memory value, modify the parser to = GAUGE32: $int:var1$. It contains the keyword = GAUGE32: that always stays the same, and the variable $var1 that varies in different devices.

Variable — the variable defined in the parser. To change the auto-created variable name to a more meaningful name, rename the variable such as from var1 to free_memory.

7.Highlight the used memory value exactly in the sample data, and then follow step 6 to add the variable used_memroy.

Note: In the Parser field of the Keyword Parser dialog, modify the default parser to = GAUGE32: $int:var1$, and rename the variable name as used_memory.

8.Click Save on the upper right corner of the page. The parser will be saved in the Parser Library.

Note: SNMP Parser has two special built-in SNMP parameters: $cpu_oid and $mem_oid, representing the CPU and memory usage of a device respectively. When you use these two parameters in the Command field, select a device to retrieve data, the system will automatically to get the CPU usage and memory usage by looking up the corresponding OID of the device in the domain.


See also:

Advanced Filter