Configure Overload Protection for Intelligent AI Connector
You can configure overload protection for the Intelligent AI Connector (IAC) using the Remote Console, the REST APIs, or the WLST.
Remote Console
- In the Edit Tree, select .
- Click New.
- Select the resource (CPU, Memory, STTCount) to protect.
- Set the upper and lower limit for this resource.
- Click Create.
- Click the shopping cart and then Commit Changes.
REST API
The request to set overload protection on the IAC follows this syntax:
curl -v -X POST \
-u <username>:<password> \
-H X-Requested-By:MyClient \
-H Accept:application/json \
-H Content-Type:application/json \
-d '{
"resourceName": "<CPU|Memory|STTCount>",
"min": <lower_limit_integer>,
"max": <upper_limit_integer>
}' \
"http://<adminserver_host>:<port>/management/weblogic/latest/edit/customResources/IntelligentAIConnector/customResource/AIConnectorOverLoadProtection/AICThresholds/AICThreshold"WLST
To add overload protection to the IAC using WLST:
- Navigate to the
<DOMAIN_HOME>/bindirectory. - Set the environment variables.
. ./setDomainEnv.sh - Save the following script to a file.
try: connect('<username>', '<password>', 't3://<adminserver_ip>:<port>') edit() startEdit() cd('/CustomResources/IntelligentAIConnector/CustomResource/IntelligentAIConnector') aic = cmo aicOlp = aic.getAIConnectorOverLoadProtection() thresholds = aicOlp.getAICThresholds() name = '<threshold_name>' # e.g. CPU / Memory / STTCount threshold = thresholds.lookupAICThreshold(name) if threshold is not None: print 'AICThreshold already exists:', name cancelEdit('y') print 'res:0' disconnect('true') exit('true') threshold = thresholds.createAICThreshold(name) threshold.setMin(<min_value>) threshold.setMax(<max_value>) save() activate(block='true') print 'res:1' except Exception, e: print e dumpStack() print 'res:0' disconnect('true') exit('true') - Run the script.
java weblogic.WLST /path/to/file.py