User Tools

Site Tools


uls:agents:wls_tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uls:agents:wls_tools [2013-11-19 09:27]
uls [ULS-Agent for Oracle Weblogic]
uls:agents:wls_tools [2014-12-16 17:57] (current)
uls
Line 1: Line 1:
 ===== ULS-Agent for Oracle Weblogic ===== ===== ULS-Agent for Oracle Weblogic =====
  
-WLS_TOOLS+Aka the WLS_TOOLS, is the [[http://​www.gnu.org/​licenses/​gpl.txt|GPLv3]]-based ULS-agent for gathering runtime metrics  
 +and status information about Oracle WebLogic servers  
 +running on Unix-like operating systems.
  
-ULS-agent for logging configuration settings and checking runtime metrics of Oracle'​s Weblogic Server.+==== Overview ==== 
  
-==== Introduction ====+The [[wls_tools]] consists of several python/wlst scripts and bash scripts to: 
 + 
 +  * gather runtime metrics of an Oracle WebLogic Server instance 
 + 
 +It requires WLST to run and the [[:​uls:​agents:​linux]] for data transmission to the ULS-server. 
 + 
 +All results and/or reports are generated as ULS value files in the [[uls:​agents:​value_file_format]] 
 +which are sent to the ULS-server by using the [[:​uls:​agents:​linux]].
  
 The WLS_TOOLS are a collection of scripts that can monitor ​ The WLS_TOOLS are a collection of scripts that can monitor ​
Line 12: Line 21:
  
 Start and stop scripts for an Oracle Weblogic server (cold standby) cluster package ​ Start and stop scripts for an Oracle Weblogic server (cold standby) cluster package ​
-in conjunction with the SCript-CLuster are provided, see :ref:`sccl`.+in conjunction with the SCript-CLuster are provided, see :TODO:.
  
 The monitoring script uses the WLST, but only reads metrics. ​ The monitoring script uses the WLST, but only reads metrics. ​
Line 21: Line 30:
 analysis and monitoring. analysis and monitoring.
  
 +-----
  
 ==== Installation ==== ==== Installation ====
  
-Overview +=== Overview ​===
---------+
  
   * be sure to have installed an uls-client-2.x or later :​ref:​`uls_client_for_linux` ​   * be sure to have installed an uls-client-2.x or later :​ref:​`uls_client_for_linux` ​
Line 34: Line 43:
  
  
-Preparations +=== Preparations ​===
-------------+
  
 Login to your server where you want to use the WLS_TOOLS Login to your server where you want to use the WLS_TOOLS
 and try this command to check for the necessary ULS-client: and try this command to check for the necessary ULS-client:
  
-.. code-block:: ​bash+<code bash
 +$ whereis flush_test_values 
 +flush_test_values:​ /​usr/​local/​bin/​flush_test_values 
 +</​code>​
  
-  $ whereis flush_test_values +If not, you must install or update the ULS-client first, see :TODO:.
-  flush_test_values:​ /​usr/​local/​bin/​flush_test_values +
- +
-If not, you must install or update the ULS-client first, see :ref:`uls_client_for_linux`.+
  
 Login as the user "​weblogic"​ Login as the user "​weblogic"​
Line 51: Line 59:
 change to its home directory and create a sub-directory:​ change to its home directory and create a sub-directory:​
  
-.. code-block:: ​bash +<code bash> 
- +$ mkdir WLS_TOOLS 
-  ​$ mkdir WLS_TOOLS +$ cd WLS_TOOLS 
-  $ cd WLS_TOOLS+</​code>​
  
 Download the the current version of the WLS_TOOLS ​ Download the the current version of the WLS_TOOLS ​
  
-:download:​`WLS_TOOLS_2012-03-29<​WLS_TOOLS_2012-03-29.zip>​`+:TODO:​`WLS_TOOLS_2012-03-29<​WLS_TOOLS_2012-03-29.zip>​`
  
 If you got that file in the software depot of your ULS-server ​ If you got that file in the software depot of your ULS-server ​
-you can use the commands to download the zip-archive from there+you can use the commands to download the zip-archive from there.
- +
-.. code-block::​ bash +
- +
-  $ U=`. /​etc/​uls/​uls.conf;​ echo $ULSSERVER` +
-  $ /​usr/​local/​bin/​httpget -f WLS_TOOLS_2012-03-29.zip $U download.s3w?​datei=WLS_TOOLS_2012-03-29.zip +
-  Datei WLS_TOOLS_2012-03-29.zip geschrieben.+
  
 Check the checksums by using one of these: Check the checksums by using one of these:
  
-.. code-block:: bash+<code bash> 
 +$ md5sum WLS_TOOLS_*.zip 
 +$ sha1sum WLS_TOOLS_*.zip 
 +$ cksum WLS_TOOLS_*.zip 
 +</code>
  
-  $ md5sum WLS_TOOLS_*.zip +:TODOadd the checksums
-  $ sha1sum WLS_TOOLS_*.zip +
-  $ cksum WLS_TOOLS_*.zip +
- +
- +
-.. list-table:: checksums ​for WLS_TOOLS_2012-03-29.zip +
-   :​widths:​ 15 40 +
-   :​stub-columns:​ 1 +
- +
-   * - md5sum +
-     - eb95d5ab8a5617e5998629fe4db018e6 +
-   * - sha1sum +
-     - 48b6a97426a29d0ce4f5810f1eeb802f7a10044e +
-   * - cksum +
-     - 2262049450 22110+
  
 Unpack the zip-archive:​ Unpack the zip-archive:​
  
-.. code-block:: ​bash +<code bash> 
- +$ unzip WLS_TOOLS_*.zip 
-  ​$ unzip WLS_TOOLS_*.zip +Archive: ​ WLS_TOOLS_2012-03-29.zip 
-  Archive: ​ WLS_TOOLS_2012-03-29.zip +  inflating: watch_wls.py 
-    inflating: watch_wls.py +  inflating: watch_wls.sh 
-    inflating: watch_wls.sh +  inflating: sccl_wls_startstop 
-    inflating: sccl_wls_startstop +  inflating: README.txt 
-    inflating: README.txt +  inflating: COPYING.txt 
-    inflating: COPYING.txt +  inflating: zip_it.txt 
-    inflating: zip_it.txt+</​code>​
  
 A directory listing should look like: A directory listing should look like:
  
-.. code-block::​ bash +<​file>​ 
- +$ ls -al 
-  ​$ ls -al +-rw------- ​  1 weblogic ​  ​oinstall ​    32473 Feb  2  2012 COPYING.txt 
-  -rw------- ​  1 weblogic ​  ​oinstall ​    32473 Feb  2  2012 COPYING.txt +-rw------- ​  1 weblogic ​  ​oinstall ​     1033 Nov 22  2011 README.txt 
-  -rw------- ​  1 weblogic ​  ​oinstall ​     1033 Nov 22  2011 README.txt +-rw-r--r-- ​  1 weblogic ​  ​oinstall ​    22110 Nov  1 11:41 WLS_TOOLS_2012-03-29.zip 
-  -rw-r--r-- ​  1 weblogic ​  ​oinstall ​    22110 Nov  1 11:41 WLS_TOOLS_2012-03-29.zip +-rwx------ ​  1 weblogic ​  ​oinstall ​      378 Aug 24  2011 sccl_wls_startstop 
-  -rwx------ ​  1 weblogic ​  ​oinstall ​      378 Aug 24  2011 sccl_wls_startstop +-rw------- ​  1 weblogic ​  ​oinstall ​    28967 Mar 29  2012 watch_wls.py 
-  -rw------- ​  1 weblogic ​  ​oinstall ​    28967 Mar 29  2012 watch_wls.py +-rwx------ ​  1 weblogic ​  ​oinstall ​     1616 Nov  1 11:52 watch_wls.sh 
-  -rwx------ ​  1 weblogic ​  ​oinstall ​     1616 Nov  1 11:52 watch_wls.sh+</​file>​
  
 Be sure to have a script (e.g. `weblogic_env`) Be sure to have a script (e.g. `weblogic_env`)
Line 118: Line 110:
 for the Oracle Weblogic server. At least needed are the following: for the Oracle Weblogic server. At least needed are the following:
  
-.. code-block:: ​bash+<code bash
 +# That is needed 
 +WL_HOME=/​oracle 
 +export WL_HOME
  
-  # That is needed +ADMIN_PORT=7001 
-  WL_HOME=/oracle +export ​ADMIN_PORT 
-  export ​WL_HOME+</​code>​
  
-  ADMIN_PORT=7001 +=== Customization ===
-  export ADMIN_PORT+
  
- +You **must** customize the script ​'watch_wls.sh' ​to your needs!
-Customization +
------------------------------------------------------------ +
- +
-You **must** customize the script ​`watch_wls.shto your needs!+
  
 Set the correct server name.  Set the correct server name. 
 That may be the hostname (default if not set) or a cluster name: That may be the hostname (default if not set) or a cluster name:
  
-.. code-block:: ​bash +<code bash watch_wls.sh>
-  :​emphasize-lines:​ 7,18,19 +
- +
-  $ vi watch_wls.sh +
- +
-  ...+
   # -----   # -----
   # set environment   # set environment
-  ​# . /​oracle/​middleware/​wlserver_10.3/​server/​bin/​setWLSEnv.sh +  . ~weblogic/wls_env
-  ​. ~weblogic/wls_env_eperst+
   if [ $? -ne 0 ] ; then   if [ $? -ne 0 ] ; then
     echo     echo
-    echo "​Error:​ Cannot source Oracle'​s environment script '​~weblogic/​wls_env_eperst'"​+    echo "​Error:​ Cannot source Oracle'​s environment script '​~weblogic/​wls_env'"​
     echo     echo
     exit 1     exit 1
Line 156: Line 140:
   # Set environment variables   # Set environment variables
  
-  # export ULS_HOSTNAME=lcepaqa 
   export ULS_HOSTNAME=`hostname`   export ULS_HOSTNAME=`hostname`
-  # export ULS_HOSTNAME="​lceprt"​+</​code>​
  
 Check also the othe possible settings in the `watch_wls.sh` like: Check also the othe possible settings in the `watch_wls.sh` like:
  
-* ULS_DATA_CACHE (directory to place the resulting ULS value files) +  ​* ULS_DATA_CACHE (directory to place the resulting ULS value files) 
-* ULS_SECTION ("​Weblogic Server"​ is the default, the domain will be appended like "​Weblogic Server [domain]"​) +  * ULS_SECTION ("​Weblogic Server"​ is the default, the domain will be appended like "​Weblogic Server [domain]"​) 
-* ADMIN_PORT (may also be set in the environment script) +  * ADMIN_PORT (may also be set in the environment script) 
-* WLS_ADMIN_URL (complete url to the admin server)+  * WLS_ADMIN_URL (complete url to the admin server)
  
  
-Credentials +=== Credentials ​===
------------------------------------------------------------+
  
 See also: `Security for WLST <​http://​download.oracle.com/​docs/​cd/​E12840_01/​wls/​docs103/​config_scripting/​using_WLST.html#​wp1093630>​`_. See also: `Security for WLST <​http://​download.oracle.com/​docs/​cd/​E12840_01/​wls/​docs103/​config_scripting/​using_WLST.html#​wp1093630>​`_.
Line 184: Line 166:
 For example, to create the user configuration file and key file: For example, to create the user configuration file and key file:
  
-.. code-block:: ​bash +<code bash> 
- +$ cd ~weblogic/​WLS_TOOLS/​ 
-  ​$ cd ~weblogic/​WLS_TOOLS/​ +$ $WL_HOME/​common/​bin/​wlst.sh
-  $ $WL_HOME/​common/​bin/​wlst.sh+
  
-  ​Initializing WebLogic Scripting Tool (WLST) ...+Initializing WebLogic Scripting Tool (WLST) ...
  
-  ​Welcome to WebLogic Server Administration Scripting Shell+Welcome to WebLogic Server Administration Scripting Shell
  
-  ​Type help() for help on available commands+Type help() for help on available commands
  
-  ​wls:/​offline>​+wls:/​offline
 +</code>
  
 .. code-block::​ python .. code-block::​ python
uls/agents/wls_tools.1384849677.txt.gz · Last modified: 2014-12-16 17:46 (external edit)