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

  1. In the Edit Tree, select Custom Resources, and then IntelligentAIConnector, and then AI Connector Configurations, and then AI Connector Overload Protection Config, and then AIC Threshold.
  2. Click New.
  3. Select the resource (CPU, Memory, STTCount) to protect.
  4. Set the upper and lower limit for this resource.
  5. Click Create.
  6. 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:

  1. Navigate to the <DOMAIN_HOME>/bin directory.
  2. Set the environment variables.
    . ./setDomainEnv.sh
  3. 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')
  4. Run the script.
    java weblogic.WLST /path/to/file.py