Worklight Analytics Operational Console empty

877 views Asked by At

I'm trying to use Worklight Analytics features for App. I have separated servers for analytics and worklight console.

I have tried the configuring of analytics in 3 way:

  1. in worklight.properties:

    wl.analytics.logs.forward=true
    wl.analytics.url=http://[host]:[port]/analytics/data
    
  2. in initOptions.js:

    {
       analytics: {enable: true, url: 'http://[host]:[port]/analytics/data'}
    }
    
  3. in server's config:

    <jndi name="[context]/wl.analytics.url" value="http://[host]:[port]/analytics/data" />
    <jndi name="[context]/wl.analytics.logs.forward" value="true" />
    

Operational Analytics page has not data.

enter image description here

3

There are 3 answers

1
Andrii Vasylchenko On BEST ANSWER

Actually problem is related to queues. If you want to have results right away also consider adding this, as jndi properties in worklight server config (in case of Liberty):

<jndiEntry jndiName="wl.analytics.queues" value='"1"'/>
<jndiEntry jndiName="wl.analytics.queue.size" value='"0"'/>
0
JFJF On

This answer is based on that the Windows 7 MFP 6.3 server is installed on top the default WAS Libery Core.

After you setting up the analytic ear file, you also need to forwarding the Data to the analytic Console. Furthermore, you have to add in the user name and password for the ear because the analytic ear file has security on. Without the username and password (which is the one for the WAS that you setup in the Configuration Tools), with just the first 3 lines, you will still see no data.

One other very important point, notice that there is a mfp/ in the jndiName. Yours might name differently, as that's the dummy project that we created in the Configuration Tools to represent the runtime. You could have called it anything else. Replace "mfp/" here with whatever you call your runtime. That's the same contextRoot that you would have used in the app settings to find the MFP server.

Setup the analytic console to forward the data

  • The worklight.analytics.url property needs to be set such that the mfp server knows where to send the data to
  • The analytics EAR file was enabled with security, specify the username and passwords so the mfp server could send data to the analytics console

Add the following lines in the server.xml as follow. Save the file and Restart the MFP standalone server to take effect.

<jndiEntry jndiName="mfp/wl.analytics.queue.size" value="1"/>
<jndiEntry jndiName="mfp/wl.analytics.url" value="http://localhost:9080/worklight-analytics-service/data"/>
<jndiEntry jndiName="mfp/wl.analytics.console.url" value="http://localhost:9080/worklight-analytics/console"/>
<jndiEntry jndiName="mfp/wl.analytics.username" value="demo"/>
<jndiEntry jndiName="mfp/wl.analytics.password" value="demo"/>
0
jnortey On

Worklight queues the data before sending it. You may have analytics data waiting to be sent but the queue has not yet filled. Try setting the following property:

wl.analytics.queue.size=1