When you deploy an application to a live production environment,
you must configure usage logging by updating the server cluster XML files in
the
config
directory of the deployed EAC application on
disk.
The steps below assume you have promoted your application from an authoring or staging server to your live environment.
At a high level, configuring usage logging consists of specifying the following in the logging configuration files:
Optionally, you can configure logging on an authoring or staging environment for testing and to ensure that everything works as expected.
To configure usage logging:
Navigate to the
config\script
directory of your deployed EAC application on disk.For example,
Endeca\apps\Discover\config\script
.If you have licensed Oracle Commerce Guided Search with Experience Manager, modify the sample configuration file that defines your application server clusters:
For each server cluster, create an
<app-server-cluster>
element with anid
attribute that corresponds to the cluster name.For example:
<app-server-cluster id="LiveAppServerCluster"> </app-server-cluster>
For each server within the cluster, create an
<app-server>
element with the following attributes:For example:
<app-server id="LiveDiscover" hostName="assemblerHost.example.com" port="8006"> </app-server>
For each application running on a given Assembler, create a
<web-app>
element with the following attributes:For example:
<web-app id="DiscoverWebApp" contextPath="/discover" sslEnabled="true" /> <web-app id="DiscoverAsService" contextPath="/discoverAsService" />
Add the
<web-app>
elements to their respective<app-server>
s as referenced elements.For example:
<app-server id="LiveDiscover" hostName="assemblerHost" port="8006"> <web-app ref="DiscoverWebApp" /> <web-app ref="DiscoverAsService" /> </app-server>
Add the
<app-server>
elements to their respective<app-server-cluster>
s as referenced elements.For example:
<app-server-cluster id="LiveAppServerCluster"> <app-server ref="LiveDiscover" /> </app-server-cluster>
Verify that your Dgraph clusters are configured correctly by reviewing the
LiveDgraphCluster.xml.
file.A sample file is shown below:
<dgraph-cluster id="LiveDgraphCluster1" getDataInParallel="true" enabled="true"> <dgraph ref="DgraphA1" /> </dgraph-cluster> <dgraph-cluster id="LiveDgraphCluster2" getDataInParallel="true" enabled="true"> <dgraph ref="DgraphA2" /> </dgraph-cluster>
Modify the sample usage collection configuration file:
Specify the logging directory by modifying the
<usage-log-dir>
element:Enter paths relative to the EAC application directory. For example, the configuration below outputs logs to
<app dir>\logs\usage
:<usage-collector id="UsageCollector"> <usage-log-dir>./logs/usage</usage-log-dir> </usage-collector>
Modify the cluster elements to reference the Application Server clusters configured in Step 2 (if you are using Experience Manager) and the Dgraph clusters from Step 3:
<usage-collector id="UsageCollector"> <usage-log-dir>./logs/usage</usage-log-dir> <dgraph-cluster ref="LiveDgraphCluster1" /> <dgraph-cluster ref="LiveDgraphCluster2" /> <app-server-cluster ref="LiveAppServerCluster" /> </usage-collector>
Usage information is stored in memory in the Dgraph or Assembler, and is cleared when you restart the component. After configuring logging, you must schedule usage collection to retrieve the data and store it as log files.