Generating Vital Data from a NAT Rule

You can monitor the vital data from a NAT rule (in this example, r1) by first obtaining the MIB index of r1.

Consider the following source NAT configuration.

user@host> show configuration security nat
source {rule-set rs1 {from zone trust;to zone untrust;rule r1 {match {source-address;destination-address;}then {source-nat {interface;}}}}}

To find the MIB index of r1, enter the following command:

user@host# show snmp mib walk jnxJsNatRuleName | grep r1
jnxJsNatRuleName. = r1

The output shows that is the MIB index of r1.

Therefore, by combining the index with NAT MIB table jnxJsNatRuleHits, the session number associated with NAT rule r1 can be monitored by using the command:

user@host# set system log-vital add jnxJsNatRuleHits. comment “Number of sessions on NAT rule r1”