Databases Reference
In-Depth Information
The previous SNMP trap example was triggered from
PROD_Server02
and the
QueueLength
attribute was
435
at the time.
There's more...
Now we will see how to create an SNMP agent through WLST.
Creating the SNMP Agent by using WLST
1. Log in as a
wls
user to the shell and start WLST.
[wls@prod01]$ $WL_HOME/common/bin/wlst.sh
2. Connect to the Administration Server using
wlsadmin
as user,
<pwd>
as the
password, and
t3://adminhost.domain.local:7001
as the server URL.
wls:/offline> connect("wlsadmin","<pwd>","t3://adminhost.domain.
local:7001")
3. Run the following WLST commands:
edit()
startEdit()
cmo.createSNMPAgentDeployment('PROD_SNMPAgent')
cd('/SNMPAgentDeployments/PROD_SNMPAgent')
cmo.setMasterAgentXPort(7050)
cmo.setEnabled(true)
cmo.setSNMPPort(1610)
cmo.setPrivacyProtocol('NoPriv')
cmo.createSNMPGaugeMonitor('QueueLengthGauge')
cd('/SNMPAgentDeployments/PROD_SNMPAgent/SNMPGaugeMonitors/
QueueLengthGauge')
cmo.setMonitoredMBeanType('ThreadPoolRuntime')
cmo.setMonitoredAttributeName('QueueLength')
set('EnabledServers',jarray.array([ObjectName('com.bea:Name=PROD_
Server01,Type=Server'), ObjectName('com.bea:Name=PROD_
Server02,Type=Server'), ObjectName('com.bea:Name=PROD_
Server03,Type=Server'), ObjectName('com.bea:Name=PROD_
Server04,Type=Server')], ObjectName))
cmo.setThresholdHigh(100)
cmo.setMonitoredMBeanName('(None)')
cmo.setMonitoredMBeanName('')
Search WWH ::
Custom Search