Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

How to monitor CPU usage and flow sessions via SNMP - Juniper SRX Branch - 12.1X44
https://forum.ivorde.com/how-to-monitor-cpu-usage-and-flow-sessions-via-snmp-juniper-srx-branch-12-1x44-t14261.html
Page 1 of 1

Author:  mandrei99 [ Tue Jun 18, 2013 6:13 pm ]
Post subject:  How to monitor CPU usage and flow sessions via SNMP - Juniper SRX Branch - 12.1X44

As every operating system, Junos on SRX has special SNMP MIBs for querying SRX information via the SNMP daemon.

More Info about Junos SRX SPU monitoring MIBs can be found on Juniper website:
http://www.juniper.net/techpubs/en_US/junos11.2/information-products/topic-collections/reference-mibs-and-traps/index.html?topic-25307.html and an OID viewer:
http://www.oidview.com/mibs/2636/JUNIPER-SRX5000-SPU-MONITORING-MIB.html

Following is list of SNMP OIDs contained in the "jnxJsSPUMonitoringMIB" SNMP MIB:

Code:
jnxJsSPUMonitoringMIB   1.3.6.1.4.1.2636.3.39.1.12.1
jnxJsSPUMonitoringObjectsTable   1.3.6.1.4.1.2636.3.39.1.12.1.1
jnxJsSPUMonitoringObjectsEntry   1.3.6.1.4.1.2636.3.39.1.12.1.1.1
jnxJsSPUMonitoringIndex   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.1
jnxJsSPUMonitoringNodeIndex   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.10
jnxJsSPUMonitoringNodeDescr   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.11
jnxJsSPUMonitoringFPCIndex   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.2
jnxJsSPUMonitoringSPUIndex   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.3
jnxJsSPUMonitoringCPUUsage   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.4
jnxJsSPUMonitoringMemoryUsage   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.5
jnxJsSPUMonitoringCurrentFlowSession   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.6
jnxJsSPUMonitoringMaxFlowSession   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.7
jnxJsSPUMonitoringCurrentCPSession   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.8
jnxJsSPUMonitoringMaxCPSession   1.3.6.1.4.1.2636.3.39.1.12.1.1.1.9
jnxJsSPUMonitoringCurrentTotalSession   1.3.6.1.4.1.2636.3.39.1.12.1.2
jnxJsSPUMonitoringMaxTotalSession   1.3.6.1.4.1.2636.3.39.1.12.1.3
jnxSPUClusterObjectsTable   1.3.6.1.4.1.2636.3.39.1.12.1.4
jnxSPUClusterObjectsEntry   1.3.6.1.4.1.2636.3.39.1.12.1.4.1
jnxJsClusterMonitoringNodeIndex   1.3.6.1.4.1.2636.3.39.1.12.1.4.1.1
jnxJsClusterMonitoringNodeDescr   1.3.6.1.4.1.2636.3.39.1.12.1.4.1.2
jnxJsNodeCurrentTotalSession   1.3.6.1.4.1.2636.3.39.1.12.1.4.1.3
jnxJsNodeMaxTotalSession   1.3.6.1.4.1.2636.3.39.1.12.1.4.1.4
jnxJsNodeSessionCreationPerSecond   1.3.6.1.4.1.2636.3.39.1.12.1.4.1.5

Assuming SNMP is allowed in security zones and any RE filters in place, below is how to query Branch SRX CPU usage and number of sessions from Junos CLI

How to monitor CPU usage and number of sessions via SNMP

From Junos CLI, one can use the "> show snmp mib walk" operational command as below.
Code:
user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1     
jnxJsSPUMonitoringFPCIndex.0 = 0
jnxJsSPUMonitoringSPUIndex.0 = 0
jnxJsSPUMonitoringCPUUsage.0 = 0
jnxJsSPUMonitoringMemoryUsage.0 = 56
jnxJsSPUMonitoringCurrentFlowSession.0 = 58
jnxJsSPUMonitoringMaxFlowSession.0 = 32768
jnxJsSPUMonitoringCurrentCPSession.0 = 0
jnxJsSPUMonitoringMaxCPSession.0 = 0
jnxJsSPUMonitoringNodeIndex.0 = 0
jnxJsSPUMonitoringNodeDescr.0 = single
jnxJsSPUMonitoringFlowSessIPv4.0 = 58
jnxJsSPUMonitoringFlowSessIPv6.0 = 0
jnxJsSPUMonitoringCPSessIPv4.0 = 0
jnxJsSPUMonitoringCPSessIPv6.0 = 0

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.1 

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.2   
jnxJsSPUMonitoringFPCIndex.0 = 0

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.3   
jnxJsSPUMonitoringSPUIndex.0 = 0

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.4   
jnxJsSPUMonitoringCPUUsage.0 = 0

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.5   
jnxJsSPUMonitoringMemoryUsage.0 = 56

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.6   
jnxJsSPUMonitoringCurrentFlowSession.0 = 60

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.7   
jnxJsSPUMonitoringMaxFlowSession.0 = 32768

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.8   
jnxJsSPUMonitoringCurrentCPSession.0 = 0

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.9   
jnxJsSPUMonitoringMaxCPSession.0 = 0

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.10   
jnxJsSPUMonitoringNodeIndex.0 = 0

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.11   
jnxJsSPUMonitoringNodeDescr.0 = single

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.12   
jnxJsSPUMonitoringFlowSessIPv4.0 = 58

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.13   
jnxJsSPUMonitoringFlowSessIPv6.0 = 0

user@host> show snmp mib walk decimal .1.3.6.1.4.1.2636.3.39.1.12.1.1.1.14   
jnxJsSPUMonitoringCPSessIPv4.0 = 0


Below is how to query Branch Juniper SRX CPU usage and number of session via snmpwalk utility from a Unix host:
Code:
# snmpwalk -v2c -c public 10.10.2.2 .1.3.6.1.4.1.2636.3.39.1.12.1.1.1             
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.2.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.3.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.4.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.5.0 = Gauge32: 56
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.6.0 = Gauge32: 65
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.7.0 = Gauge32: 32768
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.8.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.9.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.10.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.11.0 = STRING: "single"
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.12.0 = Gauge32: 66
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.13.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.14.0 = Gauge32: 0
SNMPv2-SMI::enterprises.2636.3.39.1.12.1.1.1.15.0 = Gauge32: 0

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/