Analytic Templates

About Analytics Templates

In this section, you will learn about analytic templates and the analytic catalog. Analytics generate data to help you manage your assets. Application Analytics enables you to build analytic templates and upload analytics to the analytic catalog.

Analytics implement mathematical models to provide intelligence about your assets, helping you manage them more efficiently. For example, you can use analytics to trigger alerts, generate maintenance advisories, and produce performance statistics.

Application Analytics enables you to create an analytic template that you can use in multiple deployments for the specified runtime. By employing a template, you can reuse the same analytic to deploy to different assets using asset applicability, and create unique input-output (I/O) tag mapping per deployment. You can also vary the schedule per deployment. The framework expects unique name per deployment.

The analytic catalog groups the tasks necessary to successfully configure and deploy an analytic.

Add an Analytic Template

Add the analytic packaged implementation to the Application analytic catalog to be deployed to a specific analytic runtime for running the analytic.

Before You Begin

Be sure that the packaged implementation containing the code for your analytic and any supporting files, such as instructions for deployment, are available to upload.

Note: If you are using the Import from file option to ingest analytics, and if your analytics implementation contains more than 200 entries for inputs definitions, constants, and output definitions, make sure that you set the isReadyOnly key to true. This is necessary to avoid latency issues while loading multiple definitions on the UI.

About This Task

The system validates the Name and Analytic File fields before you can proceed. You will need to enter or select values based on the selected runtime type.

Depending on the type of analytic implementation the configuration options vary for adding the template to the catalog. The analytic runtime environments supported for your tenant vary based on the tenant configuration.

Procedure

  1. In the Applications menu, navigate to RELIABILITY > Analytics > Analytics Templates.
  2. Select in the page heading.
  3. Add the analytic template using one of the following methods:
    • Select the Import from file box. To ingest the complete analytic template, you must have the valid analytics ingestion .zip file ready. Refer to the topic Understand Analytic Ingestion in the reference section.
    1. Select the Import from file box.
    2. Browse to the location of the analytic ingestion .zip file and select the file.
    3. Select Open.
    4. Use the fields in the New Analytic page to configure the template.
      Note: For GEDCR runtime, update the configuration in the AnalyticDefinition.json file.
      The values in the box may vary, depending on the value that you selected in the Runtime Type box. This value determines the way the Application Analytics expects the input.json file format for the analytic algorithm. It also determines the format in which Application Analytics creates the corresponding output.json and PortToField.json files. For example, if you select the Shared Time Stamp option, then the input.json file must give the values for all shared timestamps within the timeseries data. Otherwise, if you select the Per Port Time Stamp option, then the input.json must provide per-port values for inputs and output.json will have per-port values created for outputs.
    5. Select a value in the Data Frame Type box.
    6. Enter or select values in the Template Details section of the page.
      Note: This step is not applicable to GEDCR runtime because the template details are configured in the AnalyticDefinition.json file, which is included in the .zip file.
  4. Select Submit.

Results

The template is saved to the catalog. After the analytic logic is successfully uploaded, the status changes to Published.

What To Do Next

Configure and build the analytic template after adding it to the catalog.

Analytic Template Fields based on Runtime

List of analytic template configuration requirements for different runtimes.

Field Requirements Based On Runtime

Refer to the table below to see the required and optional data entry fields based on the selected analytic runtime for the analytic template. Availability of a specific runtime is dependent on the tenant configuration.

Field NameDescriptionPredix EdgeGEDCRSmartSignalPower Fabric
Data Frame TypesThis value determines the way the Application Analytics expects the input.json file format for the analytic algorithm. It also determines the format in which Application Analytics creates the corresponding output.json and PortToField.json files.N/A
  • Shared Time Stamp
  • Per Port Time Stamp
N/AN/A
NameA unique name for the analytic template.RequiredRequiredRequiredRequired
OwnerThe name of the analytic owner, typically the developer of the analytic logic.RequiredRequiredRequiredRequired
Analytic TypeThe language used to develop the analytic.Edge Analytic Editor
  • Java (Supported versions: 1.8, 17)
  • Python (Supported versions: 3.5, 3.10, and 3.12)
SmartsignalCCAP (Version: 3.1)
Type VersionThe version for the selected language. The type version is updated based on the analytic type selected.RequiredRequiredRequiredAs defined in the runtime configuration
Analytic FileSelect to upload the packaged analytic code.
Note: The uploaded file must be in .zip or .jar format.
RequiredRequiredRequiredRequired
Analytic VersionVersion of the uploaded analytic implementation.RequiredRequiredRequiredRequired
Analytic Version UpdateThe information specific to what is new or changed in this version of the uploaded analytic package. OptionalOptionalOptionalOptional
Primary CategoryThe main category tag used for the analytic. This tag allows the analytic to be classified under the designated category for further discovery in the catalog. Enter a value that best matches the type of analytic you are creating. For example, if monitoring a turbine, you can select Monitoring.RequiredRequiredRequiredAs defined in the runtime configuration
Secondary CategoryThe secondary category tag used for the analytic. This tag allows the analytic to be classified under the designated category, allowing you to further refine where the analytic is applied.OptionalOptionalAs defined in the runtime configuration
Enable Template ExportYour packaged Analytics Template will be available for download once template is publish successfully.N/ARequiredN/AN/A
Note: You can also define custom runtime, or Bring Your Own Runtime (BYOR), which is a configuration that you define. You must work with the Application Analytics team to define the contract for the runtime and enable it on your tenant. Customization must be done during tenancy setup. This is similar to enabling other default runtime configurations.

You can configure these settings using the user interface or the AnalyticDefinition.json file (as shown in the following section) depending on the runtime. The AnalyticDefinition.json file is included in the analytic ingestion package (.zip file) that is imported during template creation. For GEDCR runtime, however, you can configure these settings only using the AnalyticDefinition.json file.

Sample AnalyticDefinition.json File

{
  "@type": "analyticEntryPxMetaData",
  "contractVersion": "1.0.0",
  "initNameSuffix": false,
  "name": "threshold",
  "author": "Support team from ingestion",
  "description": "APM threshold from ingestion with attribute constant",
  "runtimeName": "GEDCR",
  "primaryCategory": "Monitoring",
  "secondaryCategory": "",
  "hasAnalyticArtifact": true,
  "analyticVersion": "1.0.0",
  "templateDownloadEnabled" : true,
  "analyticRecipientEmails":["test@ge.com"],
  "keyValueStore": {
    "runtimeTemplateId": "",
    "runtimeTemplateName": "",
    "runtimeTemplateVersion": ""
  },
  "customInputSupported": false,
  "customConstantSupported": false,
  "customOutputSupported": false,
  "analyticArtifact": {
    "hashCode": 0,
    "uri": "",
    "name": "../executableFile/threshold-analytic-python-alerts.zip",
    "description": "",
    "filename": "../executableFile/threshold-analytic-python-alerts.zip",
    "version": "",
    "artifactType": "",
    "contentLength": 0,
    "metaData": {},
    "pxAnalyticId": "",
    "keyValueStore": {},
    "language": "Python",
    "languageVersion": "3.5",
    "isDirty": false
  },
  "analyticDefine": {
    "@type": "analyticDefinePx",
    "supportingFiles": [],
    "inputs": [
      {
        "@type": "analyticInput",
        "hashCode": 0,
        "uri": "/ports/abbe2ef0-0d32-4819-83cf-fc11f8668f2e",
        "name": "temperature",
        "description": "Any Temperature Tag is sufficient here to make a point",
        "dataType": "Double",
        "unit": "Fahrenheit",
        "unitGroup": "",
        "dataSourceType": "APM_TIMESERIES",
        "mappingValueType": "TAGS",
        "isVariablePort": false,
        "isRequired": false,
        "isDirty": false
      },
      {
        "@type": "analyticInput",
        "hashCode": 0,
        "uri": "/ports/7bc0ce36-598e-4655-8935-10b044b2ad38",
        "name": "pressure",
        "description": "Any Perssure Tag is sufficient here to make a point",
        "dataType": "Double",
        "unit": "psi",
        "unitGroup": "",
        "dataSourceType": "APM_TIMESERIES",
        "mappingValueType": "TAGS",
        "isVariablePort": false,
        "isRequired": false,
        "isDirty": false
      },
      {
        "@type": "analyticInput",
        "hashCode": 0,
        "uri": "/ports/d18223cb-7056-4fa3-834a-f69a7ec114b4",
        "name": "rpm",
        "description": "Any rpm Tag is sufficient here to make a point",
        "dataType": "Double",
        "unit": "rpm",
        "unitGroup": "",
        "dataSourceType": "APM_TIMESERIES",
        "mappingValueType": "TAGS",
        "isVariablePort": false,
        "isRequired": false,
        "isDirty": false
      }
    ],
    "constants": [
      {
        "@type": "analyticConstant",
        "hashCode": 0,
        "uri": "/ports/053310ff-e7f9-4ddd-982f-53aff0a566d0",
        "name": "threshold",
        "description": "threshold",
        "dataType": "Double",
        "unit": "None",
        "unitGroup": "",
        "dataSourceType": "CONSTANT",
        "mappingValueType": "CONSTANT",
        "value": "10",
        "isVariablePort": false,
        "isRequired": false,
        "isDirty": false
      },
      {
        "@type": "analyticConstant",
        "hashCode": 0,
        "uri": "/ports/d41d9e08-89f5-44f0-a5f3-2fde9bd4acf8",
        "name": "threshold_attribute",
        "dataType": "Double",
        "unit": "None",
        "unitGroup": "",
        "dataSourceType": "CONSTANT",
        "mappingValueType": "ATTRIBUTES",
        "value": "",
        "isVariablePort": false,
        "isRequired": false,
        "isDirty": false
      }
    ],
    "outputs": [
      {
        "@type": "analyticOutput",
        "hashCode": 0,
        "uri": "/ports/0085d7a3-cde9-4afb-afca-0e9305f8c4ae",
        "name": "mean",
        "dataType": "Double",
        "unit": "None",
        "unitGroup": "",
        "dataSourceType": "APM_TIMESERIES",
        "mappingValueType": "TAGS",
        "isVariablePort": false,
        "isRequired": false,
        "isDirty": false
      },
      {
        "@type": "analyticOutput",
        "hashCode": 0,
        "uri": "/ports/071d9648-c9f6-4863-a7b6-f0aaf4905378",
        "name": "deviation",
        "description": "Deviation output for alert-2. 1 if above the expr is true and 0 if it's false.",
        "dataType": "Double",
        "unit": "None",
        "unitGroup": "",
        "dataSourceType": "APM_TIMESERIES",
        "mappingValueType": "TAGS",
        "isVariablePort": false,
        "isRequired": false,
        "isDirty": false
      }
    ],
    "outputEvents": [
      {
        "@type": "analyticOutputEvent",
        "hashCode": 0,
        "uri": "/ports/314820bb-bf69-4689-b7fa-02b0399483f3",
        "name": "cafAutomationAlert",
        "unit": "",
        "unitGroup": "",
        "dataSourceType": "APM_ALARM",
        "mappingValueType": "APM_ALARM",
        "isVariablePort": false,
        "isRequired": false,
        "isDirty": false
      }
    ],
    "models": [],
    "hashCode": -1723771949,
    "analyticTemplateType": "HierarchicalType",
    "isDirty": true,
    "isAggregateEnabled": false
  },
  "isCustomInputSupported": false,
  "isCustomConstantSupported": false,
  "isCustomOutputSupported": false,
  "isReadOnly": false
}
Table 1. Analytic Version Support Based On Runtime
RuntimeMultiple Version Support?Instructions To Upload And Save A New Version
GEDCRYesTo save a new version of the analytic (.zip or .jar) file, upload a new file, enter the new Analytic Version number, and then enter the Analytic Version Update description. The latest version of the analytic artifact will be used to run all future deployments. Existing deployments continue to use the currently assigned version unless you explicitly redeploy them to run with the new version.
SmartSignalYesTo save a new version of the analytic (.zip or .jar) file, upload a new file, enter the new Analytic Version number, and then enter the Analytic Version Update description. The latest version of the analytic artifact will be used to run all future deployments. Existing deployments continue to use the currently assigned version unless you explicitly redeploy them to run with the new version.
Power DatafabricVariesDepends on the runtime definition and configuration.

Supported Data Sources

Data SourceGEDCREdgeSmartSignalPower Fabric
APM Time SeriesYesYesYesYes
APM Asset AttributesYesYesNoYes
ConstantYesYesYesYes
BlobstoreNoNoNoNo
AnyNoNoNoNo
PostgresNoNoNoNo
Predix TimeseriesNoNoNoYes

Modify an Analytic Template

Use the modify functionality to modify existing Analytic Catalog entries.

About This Task

You cannot modify the runtime type for an existing analytic template in the catalog. You may be able to modify only some fields for the selected analytic depending on its runtime type. You can see values in disabled fields but cannot modify them. For some other runtimes, you can change the field values using the AnalyticDefinition.json file.

Make sure you check all existing deployments that use the analytics template before you modify it. If your modified artifact has analytic implementation that is significantly different from the previously uploaded artifact in the catalog, consider creating a new analytic to add to the catalog instead of updating the existing one.

Procedure

  1. In the Applications menu, navigate to RELIABILITY > Analytics > Analytics Templates.
  2. In the Search pane, locate and select an analytics to access it.
  3. In the workspace, select to access the analytic template for modification.
  4. In the Analytics Template page, you can modify values in some of the existing boxes. Or, depending on the analytic runtime, upgrade the version and artifact file path using the AnalyticDefinition.json file. For instructions, refer to Configure the Analytics Template.
    If the fields are changed in the AnalyticDefinition.json file, repackage the .zip file with the upgraded executable and the AnalyticDefinition.json file.
  5. When you have completed your modifications, select Submit.

Results

After selecting Submit, the page reflects your changes to the analytic.

Delete an Analytic Template

You can delete an analytic template in the analytic catalog.

About This Task

Before you delete an analytic template in the analytic catalog, make sure that it is not being used in orchestrations or deployments. Deleting an analytic deletes its deployments. This cannot be undone.

Procedure

  1. In the Applications menu, navigate to RELIABILITY > Analytics > Analytics Templates.
  2. In the Search pane, locate and select an analytics to access it.
  3. In the workspace of the Analytics Template page, select Delete.
  4. In the Delete the Analytic window, select Delete.
    Note: This cannot be undone.

Disable Analytic Template Export (GEDCR Runtime)

Before You Begin

You must have the necessary permissions to Manage Analytics Export.

About This Task

Disabling export will permanently disable template download. This cannot be undone.

Procedure

  1. In the Applications menu, navigate to RELIABILITY > Analytics > Analytics Templates.
  2. In the Search pane, locate and select an analytics to access it.
  3. In the workspace of the Analytics Template page, a Export Access window appears, select Enable/Disable Export.

Results

Your preference for Export Access is saved.