Book Image

Oracle WebLogic Server 12c Advanced Administration Cookbook

By : Dalton Iwazaki
Book Image

Oracle WebLogic Server 12c Advanced Administration Cookbook

By: Dalton Iwazaki

Overview of this book

Table of Contents (15 chapters)
Oracle WebLogic Server 12c Advanced Administration Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Enabling RESTful Management Services


WebLogic Server 12c introduces the possibility of monitoring WebLogic Server using RESTful Web Services with new RESTful Management Services.

RESTful Management Services is disabled by default. This recipe will enable it.

Getting ready

WebLogic Administration Server must be up and running.

To enable WebLogic RESTful Management Services, you have to access the Administration Console at http://prod01.domain.local:7001/console.

How to do it...

Carry out the following steps to enable RESTful Management Services:

  1. Access the Administration Console with your web browser at http://prod01.domain.local:7001/console.

  2. Click on the Lock & Edit button to create a new change session.

  3. Navigate to Settings for Domain | General by clicking Home and then Domain or by clicking the PROD_DOMAIN link.

  4. Check the Enable RESTful Management Services checkbox, as shown in the following screenshot:

  5. Restart WebLogic Administration Server and all Servers of the domain.

How it works...

RESTful Management Services exposes WebLogic Server instances and WebLogic clusters, applications, and data sources to be monitored using the HTTP GET method and RESTful formats, such as XML, JSON, and HTML.

The following table displays the resources to be monitored and the corresponding URIs to be accessed.

Resource

URI

Servers

http://prod01.domain.local:7001/management/tenant-monitoring/servers

Specific Server

http://prod01.domain.local:7001/management/tenant-monitoring/servers/<servername>

Clusters

http://prod01.domain.local:7001/management/tenant-monitoring/clusters

Specific Cluster

http://prod01.domain.local:7001/management/tenant-monitoring/clusters/<clustername>

Applications

http://prod01.domain.local:7001/management/tenant-monitoring/applications

Specific Application

http://prod01.domain.local:7001/management/tenant-monitoring/ applications/<applicationame>

Data Sources

http://prod01.domain.local:7001/management/tenant-monitoring/datasources

Specific Data Source

http://prod01.domain.local:7001/management/tenant-monitoring/datasources/<datasourcename>

Note

To access the full response format of each resource, add "?format=full"at the end of the URI.

The following image illustrates a RESTful request to monitor all servers of the domain. It contains the name, state, and health of the Administration Server instance PROD_AdminServer. It also contains the WebLogic version, the machine that this server is running, open sockets, the Java version, the operational system, the Java heap size, and the Java heap in use. The PROD_Server01 and PROD_Server02 instances are down, and their state is also displayed as SHUTDOWN:

There's more...

RESTful Management Services can also be enabled through WLST.

Enabling RESTful using WLST

  1. Log in as a wls user to shell and start WLST:

    [wls@prod01]$ $WL_HOME/common/bin/wlst.sh
    
  2. Connect to the Administration Server using wlsadmin as the user, <pwd> as the password, and t3://prod01.domain.local:7001 as the server URL:

    wls:/offline>connect("wlsadmin","<pwd>","t3://prod01.domain.local:7001")
    
  3. Run the following WLST commands:

    edit()
    startEdit()
    cd('/RestfulManagementServices/PROD_DOMAIN')
    cmo.setEnabled(true)
    save()
    activate()
    exit()
    
  4. Restart WebLogic Administration Server and all servers of the domain.

See also

  • Starting the Administration Server

  • Saving and activating changes in the Administration Console