decisions-metering

View the Project on GitHub DecisionsDev/decisions-metering

Enabling metering on other supported application servers

You use the res-setup Ant task to configure each artifact for which you want to enable metering.

About this task

You can enable the metering feature for the following Decision Server runtime features:

The metering parameters are described in Setting up Decision Server to integrate with the metering services.

Procedure

  1. Run the res-setup Ant task as described below.

    The execution unit (XU) is packaged as a .rar file and is shared by all the Decision Server runtime features (HTDS, testing and simulation) that are installed on the same node as the XU. For example, for WebSphere Application Server (WAS):

     cd <odm_install_dir>/executionserver/bin
     <odm_install_dir>/shared/tools/ant/bin/ant -f ressetup.xml -Dxu.in=../applicationservers/WebSphere/jrules-res-xu-WAS.rar -Dxu.out=<my_output_dir>/jrules-res-xu-WAS.rar -Dmetering.enable=true -Dmetering.server.url=http://<odmmeteringservicehost>:<odmmeteringserviceport> -Dmetering.api.key=<irrelevant,putanything> -Dmetering.instance.identifier=<meteringclientID> -Dmetering.send.usages=true setup-metering
    
  2. Refer to your application server guide to deploy the XU. For WAS, deploy the generated output file from the WAS administrative console:

    a. Open Resources > Resource Adapters , and then click Resource Adapters.

    b. Select the JRulesXU resource adapter, and then click Delete.

    c. In the Messages panel, click Save directly to the master configuration.

    d. In the Resources > Resource Adapters > Resource Adapters page, click Install RAR.

    e. Select the output file generated by the res-setup Ant task in the first step, then click Next.

    f. In the General Properties section of the Configuration tab, set JRulesXU as Name, then click OK.

    g. In the Messages panel, click Save directly to the master configuration.

    h. In the Resources > Resource Adapters > Resource Adapters page, click the JRulesXU resource adapter.

    i. In the Additional Properties section, click J2C connection factories.

    j. In Resource Adapters > JRulesXU > J2C connection factories, click New.

    k. In Resource Adapters > JRulesXU > J2C connection factories > New, set eis/XUConnectionFactory as JNDI Name and XUConnectionFactory as Name, then click Apply.

    l. In the Messages panel, click Save directly to the master configuration.

  3. Optional: When more than one Decision Server instance connects to the metering service, in particular in the case of a cluster, each instance must be uniquely identified by using the attributes metering.install.directory and metering.instance.identifier.
  4. Stop, and then restart the application server.
  5. To verify that the XU has been initialized for metering, execute a ruleset through HTDS, testing or simulation, and then check the logs for metering related messages.

Results

The Decision Server data is now sent to your metering service.

Back to Setting up Decision Server to integrate with the metering services

© Copyright IBM Corporation 2024