Before You Begin
This 15-minute tutorial shows you how to create metrics or Key Performance Indicators (KPIs) to help you track key production data for your factories and machines and predict the need for maintenance using the Oracle Internet of Things (IoT) Production Monitoring Cloud Service application.
Background
Oracle IoT Production Monitoring Cloud Service is a specialized Internet of Things application. This application lets you locate your factories and machines, and monitor their health and utilization.
Vision Corp., a manufacturer for tablets and smartphones, has implemented the Oracle IoT Production Monitoring Cloud Service application to improve yield, quality, and reliability of the products that are manufactured in the factory. The machines in the factory are a display picker, glue dispenser, and a display mount. The application is configured to detect anomalies, trigger incidents, display the historical and current values of the sensor data, and display the status of the incidents.
What Do You Need?
- Access to an instance of Oracle IoT Cloud Service
- Access to an instance of Oracle IoT Production Monitoring Cloud Service
- For the KPIs to work, you must define a factory, a machine and configure a production plan using the simulator. Complete these tutorials to define them: Configuring an Oracle IoT Production Monitoring Cloud Service Application, Tracking Machine Conditions in an Oracle IoT Production Monitoring Cloud Service Application, Monitoring Factory Operations in an Oracle IoT Production Monitoring Cloud Service Application
Use the Visual Expression Builder to Create a KPI
In this section, you create a custom KPI (metric) using the Visual Expression Builder to define an expression to calculate the average of the glue temperature in the Glue Dispenser machine.
- Sign in to your instance of the Oracle IoT Production Monitoring Cloud Service application.
- Click Menu
and then click Configuration
. Click Metrics
tab and then Create Metric
.
- On the Create Metric page, enter
Avg Glue Temperature
, then click Entity Type field and select GlueDispenserMachineType. - From the Metric Type drop-down list, select Query, and from the Calculate drop-down list, select On Demand for All Machines.
- On the Formula editor, click Click here to insert formula.
- On the popup, select the aggregation Average.
- Click the arrow between the parentheses to show the Formula Menu popup and select Property, then Sensor and then glue_temperature.
- To verify that the expression is valid, click Validate Formula.
- Click Save and then Republish. You need to wait a few minutes after clicking that button for the KPI to be available.
- Click Back.


You can build your operation using the elements in the Formula editor, or click Advanced to directly edit the SQL-like expression.
Add the KPI to the Map Dashboard
- Click Menu
and then click Map.
- In the Metrics toolbar, click the Edit
icon.
- On the Metrics page, click the Add New Gadget
icon.
- On the Create Metric page enter or select the following values:
- Type: Metrics
- Metric: Avg Glue Temperature
- Label:
Avg Glue Temperature
- Unit:
°
- Color: Light Blue
- On the metrics bar, notice the Avg Glue Temperature KPI. You can move the position of the KPI by clicking in the three dots icon.
Description of the illustration kpi_avg_glue_temp.png - Click Save.
Create an Anomaly Based Rule
In this section, you create an anomaly and then a rule for the Glue Dispenser Machine Type, so that a warning is generated when the anomaly occurs.
- Click Menu
, and then click Configuration.
- Click the Anomalies
tab, and then on the Anomalies page, click Add
.
- On the Configure New Anomaly page, enter or select the following values for Details:
- Name:
Glue temp anomaly
- Description:
Glue temperature anomaly
- Name:
- For Detection Target:
- Machine Type: GlueDispenserMachineType
- Attribute: glue_temperature
- For Training Data:
- Analysis Method: Automatic
- Specimen Machine: SF_Factory_GlueDispensingM1
- Training Window: 1 hour
- Deviation Threshold: 2
- Click Save, and then click Publish/Republish. The Publishing KPI metrics...Building message is displayed. Wait until the message changes to Activated.
- To return to the Anomalies page, click Back.
- Click Menu
, and then click Rules.
- On the Rules page, click Create New Rule
.
- On the Create New Rule page, in the Details section, enter or select the following values:
- Name:
Glue Temperature Warning
- Apply to: Machine Type and GlueDispenserMachineType
- Name:
- In the Condition section, select Glue temp anomaly and Occurred.
- In the Fulfillment section, select the following values:
- Fulfill when: All Conditions Apply
- Generate: Warning
- In the Warning Details section, enter or select the following values, and then click Save:
- Summary:
Glue Temp Warning
- Level: High
- Summary:
- Click Save.
Customize Existing Metrics
In this section, you customize the metrics in the Map and Factory views to use an order and colors that are meaningful. You can also add new groups to organize your metrics.
- In the Map view, click the Edit
icon located in the Metrics toolbar.
- Customize the Metrics toolbar using these alternatives:
- Click Add
to add a new group.
- Click ... (three dots) to drag and drop the metric to a different location in the same group, or to another group.
- Click Add
- You can delete a section or a metric by selecting the Delete
icon.
- Click Save.

Want to Learn More?
- What Are Metrics? in Using Oracle Internet of Things Production Monitoring Cloud Service