-
Notifications
You must be signed in to change notification settings - Fork 217
log rotation enhancements and doc #1872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…tor .out, and document log rotation for WLS .out and .log.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ description: "Important considerations for WebLogic domains in Kubernetes." | |
* [About the Domain resource](#about-the-domain-resource) | ||
* [Managing life cycle operations](#managing-life-cycle-operations) | ||
* [Scaling clusters](#scaling-clusters) | ||
* [Log files](#log-files) | ||
|
||
#### Important considerations for WebLogic domains in Kubernetes | ||
|
||
|
@@ -35,6 +36,7 @@ Be aware of the following important considerations for WebLogic domains running | |
* _Log File Locations:_ The operator can automatically override WebLogic domain, server, and introspector log locations. | ||
This occurs if the Domain `logHomeEnabled` field is explicitly set to `true`, or if `logHomeEnabled` isn't set | ||
and `domainHomeSourceType` is set to `PersistentVolume`. When overriding, the log location will be the location specified by the `logHome` setting. | ||
For additional log file tuning information, see [Log files](#log-files). | ||
|
||
* _Listen Address Overrides:_ The operator will automatically override all WebLogic domain default, | ||
SSL, admin, or custom channel listen addresses (using situational configuration overrides). These will become `domainUID` followed by a | ||
|
@@ -132,3 +134,65 @@ The operator let's you initiate scaling of clusters in various ways: | |
* [Using the operator's REST APIs]({{< relref "/userguide/managing-domains/domain-lifecycle/scaling#calling-the-operators-rest-scale-api" >}}) | ||
* [Using WLDF policies]({{< relref "/userguide/managing-domains/domain-lifecycle/scaling#using-a-wldf-policy-rule-and-script-action-to-call-the-operators-rest-scale-api" >}}) | ||
* [Using a Prometheus action]({{< relref "/userguide/managing-domains/domain-lifecycle/scaling#using-a-prometheus-alert-action-to-call-the-operators-rest-scale-api" >}}) | ||
|
||
### Log files | ||
|
||
The operator can automatically override WebLogic domain, server, and introspector `.log` and `.out` locations. | ||
This occurs if the Domain `logHomeEnabled` field is explicitly set to `true`, or if `logHomeEnabled` isn't set | ||
and `domainHomeSourceType` is set to `PersistentVolume`. When overriding, the log location will be the location specified by the `logHome` setting. | ||
|
||
If you want to fine tune the `.log` and `.out` rotation behavior for WebLogic domains and servers, then | ||
you can update the related `Log MBean` in your WebLogic configuration. Alternatively, for WebLogic | ||
servers, you can set corresponding system properties in `JAVA_OPTIONS`: | ||
|
||
- Here are some WLST off-line examples for creating and accessing commonly tuned Log MBeans: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. off-line -> offline (adj) (adv) One word. Note no hyphen. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
|
||
```bash | ||
# domain log | ||
cd('/') | ||
create(dname,'Log') | ||
cd('/Log/' + dname); | ||
|
||
# configured server log for a server named 'sname' | ||
cd('/Servers/' + sname) | ||
create(sname, 'Log') | ||
cd('/Servers/' + sname + '/Log/' + sname) | ||
|
||
# templated (dynamic) server log for a template named 'tname' | ||
cd('/ServerTemplates/' + tname) | ||
create(tname,'Log') | ||
cd('/ServerTemplates/' + tname + '/Log/' + tname) | ||
``` | ||
|
||
- Here is WLST off-line for commonly tuned Log MBean attributes: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is WLST off-line for commonly tuned Log MBean attributes: -> Here are some WLST offline (command settings OR examples) for commonly tuned Log MBean attributes: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
|
||
```bash | ||
# minimum log file size before rotation in kilobytes | ||
set('FileMinSize', 1000) | ||
|
||
# maximum number of rotated files | ||
set('FileCount', 10) | ||
|
||
# set to true to rotate file every time on startup (instead of append) | ||
set('RotateLogOnStartup', 'true') | ||
``` | ||
|
||
- Here are the defaults for commonly tuned Log MBean attributes: | ||
|
||
| Log MBean Attribute | Production Mode Default | Development Mode Default | | ||
| --------- | ----------------------- | ------------------------ | | ||
| FileMinSize (in kilobytes) | 5000 | 500 | | ||
| FileCount | 100 | 7 | | ||
| RotateLogOnStartup | false | true | | ||
|
||
- For WebLogic server `.log` and `.out` files (including both dynamic and configured servers), you can alternatively | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WebLogic server -> WebLogic Server There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
set logging attributes using system properties that start with `weblogic.log.` | ||
and that end with the corresponding Log MBean attribute name. | ||
|
||
For example, you can include `-Dweblogic.log.FileMinSize=1000 -Dweblogic.log.FileCount=10 -Dweblogic.log.RotateLogOnStartup=true` in `domain.spec.serverPod.env.name.JAVA_OPTIONS` to set the behavior for all WebLogic servers in your domain. For information about setting `JAVA_OPTIONS`, see [Domain resource]({{< relref "/userguide/managing-domains/domain-resource/_index.md#jvm-memory-and-java-option-environment-variables" >}}). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WebLogic servers -> WebLogic Servers There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
|
||
{{% notice warning %}} | ||
Kubernetes stores pod logs on each of its nodes, and, depending on the Kubernetes implementation, extra steps may be necessary to limit their disk space usage. | ||
For more information, see [Kubernetes Logging Architecture](https://kubernetes.io/docs/concepts/cluster-administration/logging/). | ||
{{% /notice %}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebLogic servers -> WebLogic Servers (Because WebLogic Server is a legal product name, it should always be capitalized)
In your previous sentence, "...rotation behavior for WebLogic domains and servers," I recommend that you re-write it as "...rotation behavior for WebLogic Servers and domains."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed