This tutorial covers the following topics:
- Introducing IBM MobileFirst Platform Operational Analytics
- Viewing the Analytics Dashboard - Configurations
- Capturing data
- Capturing data - Application Activities
- Capturing data - Notification Activities
- Capturing data - Server logs
- Capturing data - Client logs
- Analytics logs
- Sending data
- Creating a custom chart
Introducing IBM MobileFirst Platform Operational Analytics
MobileFirst Operational Analytics collects data about applications, adapters, devices, logs, and your own custom events to give a high-level view of the client interaction with the IBM MobileFirst Platform Server.
In IBM MobileFirst Platform Foundation V7.0, MobileFirst Operational Analytics is delivered as an EAR file which contains two WAR files:
analytics-service.war. You can deploy the EAR file to the following supported application servers:
- WebSphere Application Server
In MobileFirst Studio, the two WAR files are installed and available by default in the embedded Liberty server.
Viewing the Analytics Dashboard - Configurations
wl.analytics.url property must be set to send data to the Analytics server and the
wl.analytics.console.url must be set to access the Analytics dashboard.
- You can set these two properties in the
After the property is set, the Analytics Dashboard link appears in the MobileFirst Operations Console.
- Click the Analytics Dashboard link to open up the dashboard in a new window.
Different types of analytics events are captured by the MobileFirst Operational Analytics server: app activities, notification activities, server logs, and client logs.
- Client initializations with the server
- Adapter calls
- Push notifications
- Server events
- Server stack traces
- Debug logs
- Custom events
- Network latency information
Capturing data - Application activities
When an application activity occurs, the event is captured automatically and forwarded to the MobileFirst Operational Analytics server.
- The following API call results in a session hit that is visualized on MobileFirst Operational Analytics:
- The following API call results in an adapter hit that is visualized on the MobileFirst Operational Analytics dashboard:
Capturing data - Notification Activities
When a push notification occurs, the event is captured automatically and forwarded to the MobileFirst Operational Analytics server.
Capturing data - Server Logs
The log data that is generated by MobileFirst Server is automatically forwarded to the MobileFirst Operational Analytics server, where the data can be searched and downloaded.
To disable this behavior, set the
wl.analytics.logs.forward property to
Capturing data - Client Logs
You can instrument a MobileFirst application with client logs to record client debugging information and events.
You can use the following APIs to create client logs which are then forwarded to the MobileFirst Operational Analytics server, where they can be searched and downloaded.
Client-side logs are captured based on the logging level that is set on the client. If you want to create analytics logs that are always captured regardless of the logging level, you can use the
Logs that are captured by the client-side logging APIs and the
WL.Analytics APIs are sent to the server automatically upon a successful server connection or a successful adapter call.
You can disable this automatic behavior by using the following call:
If you want to send this data more frequently, you can use the following API calls:
Custom charts are a new feature of MobileFirst Platform Operational Analytics 7.0. By using custom charts, you can take data that is already collected, like device ID, device model, device OS, etc., or log your own custom data and create charts. To understand how to log and send data, see Analytics logs and Sending data.
- Bar Graph
- Flow Chart
- Line Graph
- Metric Group
- Pie Chart
Creating a custom chart
Creating a custom chart is simple. The following example walks you through creating a pie chart, based on your user location.
The messages that are logged to the Operational Analytics server in this example are hard-coded locations. Those messages look like this:
To create a chart, follow these steps.
- Go to the Custom Charts tab and click Add New Chart.
The following dialog opens:
As you fill out your information, more input fields are displayed.
- Type a chart title.
- From the Event Type menu, select Custom Activities. No other option creates charts from the custom data sent to the server.
- Select a chart type. This example uses a pie chart.
- Click Save New Chart. The chart is saved under the Custom Charts tab in the main dashboard.
The last menu that becomes available depends on the chart type that you selected. In this example, the Property menu contains a list of the custom data that you created to send to the server, plus a few more. In this example, the location property is selected, as shown below.