Friday, September 21, 2018

Oracle Weblogic -1 - 1Z0-133 certification topic - Logging and Monitoring

Oracle Weblogic -1 - 1Z0-133 certification topic -   Logging and Monitoring


Topics from certification questions  point of view
  • Monitoring and Logging Services
  • How the subsystems ( eg. HTTP, EJB, JDBC, JTA and JMS)  use them
  • How to configure them
  • How to access and Interpret their messages.


Logging


Oracle Weblogic Server subsystems produce log messages using   -  Internal Framework and will distribute them using Java APIs  either  java.util.logging  or Apache Log4J

The below   two-phase logging process

1)  log messages are produced.
2)  log messages are distributed to the configured output channels.



  • By default, a server instance is able to distribute messages to standard out, server log files, the domain log file, memory buffer, and JMX.
  •  A server log file always contains messages from all subsystems and deployed applications.

Loggers and Handlers 

  • All of this occurs as per the default server logging configuration.
  • The association between loggers and handlers is made by subscription
  • Both loggers and handlers use severity levels and filters to select the log messages they are interested in processing.
  • Must have been distributed by the File Handler to the actual log file. 


  1. Message Catalog Logger 
  2. Server Logger

Configure Logging


  • Log file name and location – absolute or relative path plus file name.
    • absolute or relative path plus file name
  • Log file rotation.
    • Rotation type – either by size or by time
    • Rotation size – expressed in KB
    • Rotation time – either an hour of the day or an interval in hours
    • Whether to limit the number of log files
    • Number of log files to keep
    • Rotation target directory
    • Whether the log file should rotate at server start
  • Logging volume
    • General minimum severity – sent to all logging destinations
    • Selective minimum severity – for server log, domain log, and standard out
    • General standard out and error redirection – sent to all logging destinations
    • Domain log buffer size – batch of messages to buffer before forwarding to the domain log

Logging Filters

Filters can be created from the Administration Console, navigating to the domain Configuration and Log Filters tab. Since log filters are created at the domain level, they are available for use in any server instance in a domain.


Note - The message properties (refer below for more info) available for use in filters are the following: Date, Severity, Subsystem, Machine, Server, Thread, UserID, TXID, ContextID, Timestamp, MsgID, and Message.

Message Severity (Messages in severity notice and higher will, by default, always appear in standard out)

  • Emergency
  • Alert
  • Critical
  • Error
  • Warning
  • Notice
  • Info
  • Debug
  • Trace

Message Attributes

  • Timestamp
  • Severity
  • Subsystem
  • Origin
  • User ID
  • Transaction ID
  • Context ID
  • Milliseconds
  • Message ID    -  6  digit identifier with a BEA-prefix.
  • Message text 


 Log message from a domain log file


####<Sep 21, 2018 12:25:04 PM CST> <Notice> <WebLogicServer> <redhat.
garnica.mx> <AdminServer> <[STANDBY] ExecuteThread: '2' for queue:
'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <>
<1484386444248> <BEA-000365> <Server state changed to STARTING.>


Key points on Logging :

  • Node Manager also keeps its own log file named nodemanager.log, located in the nodemanager directory in the domain root. This file contains its own server startup and status messages.

  • It is also possible to also store transaction logs in a database instead of in the file system. Either option is configurable using the Administration Console, in the Default Store section of the Services page under the General tab of the corresponding server.

  • Changing log file name and location, log rotation type, and directory, and whether or not to rotate the log file at startup will require a server restart to become active.

  • In production mode, WebLogic Server will by default rotate the file when it reaches 5MB in size and will not rotate the log file upon server start.

Monitoring


The certification exam objectives cover only basic monitoring from the Administration Console and the Monitoring Dashboard.

Monitoring is available for server instances and their subsystems


Server Health

Core server health status[11] is available in the Health tab. It is reported by WebLogic Server in one of several states including:
  • OK – Server is healthy.
  • Warning – Services could have problems in the future.
  • Critical – Something must be done to prevent service failure.
  • Failed – Service has failed and must be restarted.
  • Overloaded – Service is functioning normally but with too much work.

Whereas the General and Health tabs report general statistics, the Channels, Performance, Threads, and Workload tabs display distinct core server runtime data as follows:
  • Channels – Network statistics including the number of connections as well as incoming and outgoing bytes and messages.
  • Performance – JVM memory and heap utilization, as well as process and system CPU load[12].
  • Threads – Statistics about the server thread pool and the behavior of individual threads.
  • Workload – Statistics of the pending and completed requests of each of the work managers in the server instance.


Recommended Exercises

  1. Enable debug mode in the server log file of a managed server.
  2. Identify the message IDs of the startup and shutdown messages in any server instance.
  3. Customize the rotation configuration of a server log file in order to have it rotate upon server restart and every 5 minutes.
  4. Create a log message filter to display only messages of severity CRITICAL and apply it to the server log file of an administration server.


Exam  Questions 
1.  It is possible to define a custom log message severity.
         a.  True               b.  False

           Answer  - True

2.  What type of Java object distributes log messages to a destination ?

        a.Logger        b.Log4J              c.  Handler                   d.  All of the above.

            Answer   -  c

3.   It is possible for applications to send custom log messages to the server log file.

           a.  True                b.  False

         Answer  :  a

4.   Weblogic server can  report information about operating system users logged in the system.

           a.  True               b.  False

          Answer   :  a

5.  Which contains statistical information about the number of threads allocated ?

          a.  Channels
          b.  Performance
           c.  Workload
           d.  None of the above

    Answer  -   c








References :


No comments:

Post a Comment

Hyderabad Trip - Best Places to visit

 Best Places to Visit  in Hyderabad 1.        1. Golconda Fort Maps Link :   https://www.google.com/maps/dir/Aparna+Serene+Park,+Masj...