9d5cad5ee245823945a25f08fa7fb2131d077bf7 8885 |
|
21-May-2013 |
JnRouvignac |
OPENDJ-902 (CR-1702) Add connectionID to the HTTP access log + move to extended log format
OPENDJ-858 (CR-1702) Add stats tracking to HTTP client connections
In HTTP access log, changed the name of the non standard "datetime" field to "x-datetime".
Added the "x-etime" field that outputs as a number.
Added validation for the log format that outputs error messages.
FileBasedHTTPAccessLogPublisherConfiguration.xml, FileBasedHTTPAccessLogPublisherConfiguration.properties:
Renamed the "datetime" field to "x-datetime" + added the "x-etime" field.
Improved the description of the ds-cfg-log-format.
TextHTTPAccessLogPublisher.java, config.properties:
Extracted constants for all supported field names.
Added ALL_SUPPORTED_FIELDS constant.
Changed logFormatFields instance member from String[] to List<String>.
Added validateLogFormat() which can output new error messages and called it from applyConfigurationChange() and initializeLogPublisher().
Added subtract().
HTTPClientConnection.java, HTTPRequestInfo.java:
Added instance member totalProcessingTime.
In sendResponse(), added to the totalProcessingTime + extracted method getProcessingTime().
Added getTotalProcessingTime(). |
943106fcb6a2100c9bdd2e044e454b7d2a2e900a 8832 |
|
03-May-2013 |
JnRouvignac |
OPENDJ-879 (CR-1642) Add HTTP access log
Implemented the HTTP access logger by taking inspiration from other loggers.
Configured the new logger everywhere other loggers are configured.
Logged the HTTP request in several places to cover all cases (happy paths, errors, etc.).
config.ldif, 02-config.ldif, HTTPAccessLogPublisherConfiguration.xml, FileBasedHTTPAccessLogPublisherConfiguration.xml, HTTPAccessLogPublisherCfgDefn.properties, FileBasedHTTPAccessLogPublisherCfgDefn.properties: ADDED
Added 2 new objectClasses HTTPAccessLogPublisherConfiguration and FileBasedHTTPAccessLogPublisherConfiguration.
config.properties:
Added new error messages for the HTTP access logger.
HTTPAccessLogger.java, HTTPAccessLogPublisher.java, TextHTTPAccessLogPublisher.java, HTTPRequestInfo.java: ADDED
HTTPRequestInfo.log() prevents double logging.
CollectClientConnectionsFilter.java:
Logged the request info when HttpServletResponse.setStatus(), sendAuthenticationFailure() and onFailure() are called.
Pushed more data to the HTTPRequestContext + switched to use the more specific HttpServletRequest/HttpServletResponse
SdkConnectionAdapter.java:
Logged the request info when close() is called.
LoggerConfigManager.java, TestCaseUtils.java:
Configured the HTTP access logger.
InProcessServerController.java: TO BE REMOVED (by Matt on the native packaging branch)
Sample log:
localhost bjensen [03/May/2013:10:14:54 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 500 "curl/7.27.0"
localhost bjensen [03/May/2013:10:15:05 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 200 "curl/7.27.0"
localhost [03/May/2013:10:15:14 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 200 "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0"
localhost [03/May/2013:10:16:40 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 401 "curl/7.27.0"
localhost [03/May/2013:10:16:50 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 200 "curl/7.27.0"
localhost [03/May/2013:10:16:51 +0200] "GET /favicon.ico/null HTTP/1.1" 404 "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0"
localhost [03/May/2013:10:17:10 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 200 "curl/7.27.0" |
de671204a509339b3e4f02cbaef15a617931e997 3388 |
|
30-Oct-2007 |
jdemendi |
s set of files provides the workflow configuration manual mode.
Until now, the workflows were automatically configured-a wokflow
was created for each base DN in the backends. When new suffixes
were added or when a backend was added, the associated workflows
were also created (and simillarly workflows were deleted as suffixes
or backends were removed).
With the manual mode, each and every workflow in the server must
be defined explicitely in the configuration. By default, the server is
running in automatic configuration mode. To have a server running
with manual configuration mode one must set the attribute in
cn=config:
dn: cn=config
...
ds-cfg-workflow-configuration-mode: auto|manual
No attribute means "auto" mode.
The workflow configuration consist of 3 parts:
- the configuration of workfow elements
- the configuration of workfows
- the configuration of network groups
The Workflow Elements - A workflow element is a basic task in a
workflow. The workflow elements are organized in trees and the
simplest tree is made of one element. For example, the workflow
element that wraps a local backend is configured as follow:
dn: ds-cfg-workflow-element-id=userRoot,cn=workflow elements,cn=config
objectClass: top
objectClass: ds-cfg-workflow-element
objectClass: ds-cfg-local-backend-workflow-element
ds-cfg-workflow-element-id: userRoot
ds-cfg-enabled: true
ds-cfg-java-class: org.opends.server.workflowelement.localbackend.LocalBackendWorkflowElement
ds-cfg-backend: ds-cfg-backend-id=userRoot,cn=Backends,cn=config
From an admin standpoint, the local backend workflow element
is an aggregation of a single backend (attribute ds-cfg-backend).
So we cannot disable/delete a backend as long as it is used by a
local backend workflow element.
The Workflows - A workflow is a chain of processing and it's
targeting all the entries under a given baseDN. The processing
is actually identified by the root node of the task tree described
above. The configuration of a workflow looks like:
dn: ds-cfg-workflow-id=userRoot,cn=workflows,cn=config
objectClass: top
objectClass: ds-cfg-workflow
ds-cfg-workflow-id: userRoot
ds-cfg-enabled: true
ds-cfg-workflow-element: ds-cfg-workflow-element-id=userRoot,cn=workflow elements,cn=config
ds-cfg-base-dn: dc=example,dc=com
From an admin standpoint, the local workflow is an aggregation
of a single elements (attribute ds-cfg-workflow-element).
So we cannot disable/delete a workflow element as long as it is used
by a local workflow.
The Network Groups - A network group defines categories for
client connection. The network group contains a set of workflows
and each client operation is routed to one (or more) workflow(s).
By default, the server create a default network group which contains
all the workflows defined in the server. The default network group
looks like:
dn: ds-cfg-id=defaultNetworkGroup2,cn=network groups,cn=config
objectClass: top
objectClass: ds-cfg-network-group
ds-cfg-id: defaultNetworkGroup2
ds-cfg-enabled: true
ds-cfg-workflow: ds-cfg-workflow-id=adminRoot,cn=Workflows,cn=config
ds-cfg-workflow: ds-cfg-workflow-id=ads-truststore,cn=Workflows,cn=config
ds-cfg-workflow: ds-cfg-workflow-id=backup,cn=Workflows,cn=config
ds-cfg-workflow: ds-cfg-workflow-id=config,cn=Workflows,cn=config
ds-cfg-workflow: ds-cfg-workflow-id=monitor,cn=Workflows,cn=config
ds-cfg-workflow: ds-cfg-workflow-id=schema,cn=Workflows,cn=config
ds-cfg-workflow: ds-cfg-workflow-id=tasks,cn=Workflows,cn=config
ds-cfg-workflow: ds-cfg-workflow-id=userRoot,cn=Workflows,cn=config
From an admin standpoint, the network group is an aggregation
of several workflows (attribute ds-cfg-workflow). So we cannot
disable/delete a workflow as long as it is used by a network group.
A unit test named WorkflowConfigurationTest tests the configuration
of network groups, workflows and workflow elements. |