Key Performance Indicators are quantifiable measurements that reflect the critical success factors of an organization. They will differ depending on the organization.
- A school may focus its Key Performance Indicators on graduation rates of its students.
- A Customer Service Department may have as one of its Key Performance Indicators, percentage of customer calls answered in the first minute.
- A Key Performance Indicator for a social service organization might be number of clients assisted during the year.
This sample develops and visualizes couple of KPIs (Key Performance Indicator) for a phone retail store. The developed KPIs are
- Quantity sold from each phone model - The owner wants to know the performance of his product line. Total sales for each of the phone model is required.
- Number of orders received by each customer - The owner wants to know the no of orders received by each customer.
- Start WSO2 BAM server with default settings.
- Go to 'WSO2_BAM_HOME/samples/kpi-definition/' directory
Type 'ant' with in the directory from the console(This publishes the events to BAM)
Published event format (Stream definition)
4. Go to management console and login
5. Go to Main -> BAM Toolbox -> Add. Select 'Phone Retail Store Toolbox' and click on Install button.
6. Go to Main -> BAM Toolbox -> List. Wait until the 'KPI_Phone_Retail_Store' toolbox status changes to Installed.
7. Wait for some time, until script complete the first run after publishing the data. (Script will run in each minute)
If hive job is successful you will see the following message on BAM console.
Ended Job = job_local_0001
Execution completed successfully
Mapred Local Task Succeeded . Convert the Join into MapJoin
8. Click on Main -> Gadgets -> View portal to see the populated gadgets on the summarized data.
Phone models sales summary
Sales summary by customers
The Hive script associated with the default KPI Monitoring sample has Cassandra port set as 9160. If you change the port offset, you should manually change the Cassandra port as well by following these steps: