@@ -96,7 +96,7 @@ The `weblogic-logging-exporter.jar` will be available under the `target` directo
96
96
97
97
## Installation
98
98
99
- This section outlines the steps that are required to add the Weblogic Logging Exporter to Weblogic Server.
99
+ This section outlines the steps that are required to add the WebLogic Logging Exporter to WebLogic Server.
100
100
101
101
1 . Download or build the WebLogic Logging Exporter as described above.
102
102
@@ -125,9 +125,9 @@ This section outlines the steps that are required to add the Weblogic Logging Ex
125
125
you can find this JAR file in your local maven repository at `~/.m2/repository/org/yaml/snakeyaml/1.27/snakeyaml-1.27.jar`.
126
126
Otherwise, you can download it from [Maven Central](https://search.maven.org/artifact/org.yaml/snakeyaml/1.27/bundle).
127
127
128
- Place this file in a suitable location, e.g. your domain directory.
128
+ Place the file(s) in a suitable location, e.g. your domain directory.
129
129
130
- Update the server classpath to include these two files . This can be done by adding a statement to the end of your
130
+ Update the server classpath to include these file(s) . This can be done by adding a statement to the end of your
131
131
`setDomainEnv.sh` script in your domain's `bin` directory as follows (this example assumes your domain
132
132
directory is `/u01/base_domain`):
133
133
@@ -137,33 +137,43 @@ This section outlines the steps that are required to add the Weblogic Logging Ex
137
137
138
138
1. Create a configuration file for the WebLogic Logging Exporter.
139
139
140
- Create a file named `WebLogicLoggingExporter.yaml` in your domain's `config` directory. You can copy the
141
- [sample provided in this project](samples/WebLogicLoggingExporter.yaml) as a starting point. That sample
142
- contains details of all of the available configuration options. A completed configuration file might look
143
- like this:
140
+ There are two options currently - the version 1.x configuration, or the new version 2.x configuration - please
141
+ note that the 2.x configuration is `alpha` and therefore subject to change as we get close to the 2.0 release.
144
142
145
- ```
146
- publishHost: localhost
147
- publishPort: 9200
148
- domainUID: domain1
149
- weblogicLoggingExporterEnabled: true
150
- weblogicLoggingIndexName: domain1-wls
151
- weblogicLoggingExporterSeverity: Notice
152
- weblogicLoggingExporterBulkSize: 1
153
- weblogicLoggingExporterFilters:
154
- - filterExpression: 'severity > Warning'
155
- ```
143
+ a. Version 1.x configuration
144
+
145
+ Create a file named `WebLogicLoggingExporter.yaml` in your domain's `config` directory. You can copy the
146
+ [sample provided in this project](samples/WebLogicLoggingExporter.yaml) as a starting point. That sample
147
+ contains details of all of the available configuration options. A completed configuration file might look
148
+ like this:
149
+
150
+ ```
151
+ publishHost: localhost
152
+ publishPort: 9200
153
+ domainUID: domain1
154
+ weblogicLoggingExporterEnabled: true
155
+ weblogicLoggingIndexName: domain1-wls
156
+ weblogicLoggingExporterSeverity: Notice
157
+ weblogicLoggingExporterBulkSize: 1
158
+ weblogicLoggingExporterFilters:
159
+ - filterExpression: 'severity > Warning'
160
+ ```
161
+
162
+ Note that you must give a unique `domainUID` to each domain. This value is used to filter logs by domain when you
163
+ send the logs from multiple domains to the same Elasticsearch server. If you are using the WebLogic Kubernetes
164
+ Operator, it is strongly recommended that you use the same `domainUID` value that you use for the domain.
165
+
166
+ It is also strongly recommended that you consider using a different Elastcsearch index name for each domain.
156
167
157
- Note that you must give a unique `domainUID` to each domain. This value is used to filter logs by domain when you
158
- send the logs from multiple domains to the same Elasticsearch server. If you are using the WebLogic Kubernetes
159
- Operator, it is strongly recommended that you use the same `domainUID` value that you use for the domain.
168
+ b. Version 2.x configuration
160
169
161
- It is also strongly recommended that you consider using a different Elastcsearch index name for each domain.
170
+ If you prefer to place the configuration file in a different location, you can set the environment variable
171
+ `WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE` to point to the location of the file.
162
172
163
- If you prefer to place the configuration file in a different location, you can set the environment variable
164
- `WEBLOGIC_LOGGING_EXPORTER_CONFIG_FILE` to point to the location of the file .
173
+ If you want to write the JSON logs to a file instead of sending it elasticsearch directly use the following configuration
174
+ [file](samples/WebLogicFileLoggingExporter.yaml) and adjust it to your needs. Make sure to rename it to WebLogicLoggingExporter.yaml .
165
175
166
- 1 . Restart the servers to activate the changes. After restarting the servers, they will load the WebLogic
176
+ 6 . Restart the servers to activate the changes. After restarting the servers, they will load the WebLogic
167
177
Logging Exporter and start sending their logs to the specified Elasticsearch instance. You can then
168
178
access them in Kibana as shown in the example below. You will need to create an index first and then go to
169
179
the visualization page.
0 commit comments