Configuration

Configure the Analytics Template

This task enables you to record inputs, constants, outputs, output events, and supporting documentation in an analytic template.

Before You Begin

  • Make sure you have uploaded the analytics to the catalog.
  • If your analytics are expected to create event based alerts, you must have the alert template defined prior to referencing it in the output events of the analytic template.

About This Task

Use the analytic template to add information required to deploy the analytics. For example, you can add a document explaining how the inputs and outputs for the analytics were determined.

After the analytics have been created and added to the catalog, you can build the analytics template. The template definitions must directly correlate to the developed analytics. For example, if your analytics expects certain inputs, constants, or outputs, make sure you define them in your template.

The Save and Cancel buttons appear after you have updated any information. You can select these buttons at any time. Selecting the button saves or cancels changes from the point of last your save or cancel operation.

Searching for an alert template in the Output Events section provides suggestions as you type.

Procedure

  1. In the module navigation menu, navigate to Analytics > Analytics Templates.
  2. In the Search pane, locate and select an analytics to access it.
  3. Optional: In the Analytic Template page, select the version link below the analytics name, then select the Make Current button next to the version in the list that appears to change the analytics version.
    The link is available only if you have added more than one version for the same analytics to the catalog. The defined runtime will use the analytics current version for running all future deployments. For example, if you have two uploaded versions, 1.0.0 and 2.0.0, to DowntimeForTurbines analytics in the catalog, you can select either 1.0.0 or 2.0.0 to run all future deployments of DowntimeForTurbines.
  4. Select the Analytic Template tab.
  5. Optional: Select in the AGGREGATE MAPPING subsection to allow multiple tags to be mapped to a single port.
    The button changes to selected ().
  6. Hover over Select to add a description in the Description section, then select to enter a description for the analytics.
    The analytics description can state its purpose, and can include types of trends or patterns. For example, you can add Use the Turbine analytics to monitor unplanned turbine downtime.
  7. In the Supporting Files section, select to add supporting files to the analytics template.
  8. As needed, enter values in the Input Definition, Constants, and Output Definition sections.
  9. In the Output Events section, select the Name box and begin entering the Alert Template name. Predix Essentials provides suggestions as you enter characters.
    The Alert Template name is validated and an error message appears if it does not exist. You can map multiple output events for a given analytic template.
  10. Verify your entries. Select Save to save changes to the template. Select Cancel to discard all changes. You must confirm or cancel your choice in the window that appears.

Results

After a successful save operation, all changes made to the analytics template are saved in the analytic catalog.

What To Do Next

Add deployments for the analytics.

Upload Supporting Files for the Analytic Template

You can upload supporting documentation for an analytic in the analytic template.

Before You Begin

Make sure you have created a catalog entry for the analytic.

About This Task

Supporting documents provide more information on the analytic, such as process-information diagrams or plant layouts. You can upload the following document types:
  • image files (.jpg, .jpeg, .png, .bmp, .tif)
  • Text type files (.doc, .docx, .xls, .xslx, .csv, .ppt, .pptx, .txt)
  • .pdf files

You cannot add folders or .exe, .bat, .cmd, .msi, .bin, .zip, or .rar files.

Procedure

  1. In the module navigation menu, navigate to Analytics > Analytics Templates.
  2. In the Search pane, locate and select an analytic in the list to access it.
  3. Select the Analytic Template tab.
  4. Select in the Supporting Files section.
  5. In the Upload New File window, select the File box to locate the file, enter a description in its Description box, and then select Submit.
    The uploaded file is listed in the SUPPORTING FILES subsection. Repeat the procedure to upload multiple files, if needed.

Modify a Supporting File Description

You can modify the description for a supporting file that has been uploaded.

Procedure

  1. In the module navigation menu, navigate to Analytics > Analytics Templates.
  2. In the Search pane, locate and select an analytic in the list to access it.
  3. Select the Analytics Template tab.
  4. Hover over the Description column of the supporting file listed in the SUPPORTING FILES subsection, and then select the description or select .
  5. Modify the description in the box, and then select outside the box.
  6. Select Save to save changes to the analytic template. Select Cancel to discard all changes. You must confirm or cancel your choice in the window that appears.

Download Template Logs from the Analytic Template

You can download a .zip file of logs containing all analytic deployments for the current version of the analytic template.

Before You Begin

You have access to analytic templates and deployments. You have already deployed the analytic and ran it at least once in the designated runtime. The button will not be visible if there are no current deployments for the selected analytic template.

Procedure

  1. In the module navigation menu, navigate to Analytics > Analytics Templates.
  2. In the Search pane, locate and select an analytic in the list to access it.
  3. Select the Analytic Template tab.
  4. In the page heading, select to download the logs as a .zip file to your device.

Results

The .zip file contains the deployment log file.
Tip: Search for the following keywords in the log file. These keywords help you determine if the analytic deployment ran successfully.

AnalyticInputJson shows the analytic inputs. Data that the analytic received from mapped input tags and attributes.

AnalyticInputJson:{  
   "data":{  
      "time_series":{  
         "time_stamp":[  
            1512184000000
         ],
         "temp_today":[  
            90.0
         ]
      },
      "constants":{  
         "threshold":1.0
      }
   }
}

AnalyticResponseJson shows the response or the analytic output . The response with outputs indicates that the analytic deployment ran successfully and data was written to the mapped outputs.

AnalyticResponseJson:{  
   "alerts":{  
      "commonKeyValueStore":{  

      },
      "commonSensors":[  

      ],
      "commonScanGroupData":{  
         "threshold":1.0
      },
      "events":[  
         {  
            "date":1512184000000,
            "keyValueStore":{  

            },
            "sensors":[  
               "temp_today"
            ],
            "scanGroupData":{  
               "scores":90.0
            }
         }
      ]
   },
   "time_series":{  
      "time_stamp":[  
         1512184000000
      ],
      "mean":[  
         90.0
      ],
      "deviation":[  
         1.0
      ]
   }
}

Example

The following is a sample of the log file:
Created app with guid 1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f
Updated app with guid 1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f ({"route"=>"379cc9ac-c29d-4957-9462-c29c12f17534", :verb=>"add", :relation=>"routes", :related_guid=>"379cc9ac-c29d-4957-9462-c29c12f17534"})
Updated app with guid 1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f ({"state"=>"STOPPED"})
Updated app with guid 1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f ({"environment_json"=>"PRIVATE DATA HIDDEN"})
Updated app with guid 1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f ({"state"=>"STARTED"})
Downloading java_buildpack...
Downloaded java_buildpack
Creating container
Successfully created container
Downloading app package...
Downloaded app package (24.1M)
Staging...
-----> Java Buildpack Version: v3.9 | https://github.com/cloudfoundry/java-buildpack.git#b050954
-----> Downloading Open Jdk JRE 1.8.0_101 from https://java-buildpack.cloudfoundry.org/openjdk/trusty/x86_64/openjdk-1.8.0_101.tar.gz (2.0s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.1s)
-----> Downloading Open JDK Like Memory Calculator 2.0.2_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/trusty/x86_64/memory-calculator-2.0.2_RELEASE.tar.gz (0.0s)
       Memory Settings: -Xms681574K -XX:MetaspaceSize=104857K -Xss349K -Xmx681574K -XX:MaxMetaspaceSize=104857K
-----> Downloading Spring Auto Reconfiguration 1.12.0_RELEASE from https://java-buildpack.cloudfoundry.org/auto-reconfiguration/auto-reconfiguration-1.12.0_RELEASE.jar (0.1s)
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (44.9M)
Creating droplet for app with guid 1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f
Uploaded droplet (66.6M)
Uploading complete
Stopping instance 002861de-2877-41e5-912e-eccee53dfe9d
Destroying container
Creating container
Successfully destroyed container
Successfully created container
Starting health monitoring of container
04:34:44,775 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[null] - For more information, please visit http://logback.qos.ch/codes.html#rfa_no_tp
04:34:44,775 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
04:34:44,776 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [consoleAppender] to Logger[ROOT]
04:34:44,776 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
04:34:44,777 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - Could not find an appender named [LOGSTASHLOG]. Did you define it below instead of above in the configuration file?
04:34:44,777 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction - See http://logback.qos.ch/codes.html#appender_order for more details.
04:34:44,777 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
04:34:44,777 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@542055f3 - Registering current configuration as safe fallback point
2019-03-07 04:34:47,095 3555 px_correlation_id= px_zone_id= px_service= px_user_name= [main] INFO  o.c.r.s.CloudPropertySourceApplicationContextInitializer - Adding 'cloud' PropertySource to ApplicationContext
2019-03-07 04:34:50,859 7319 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  c.g.p.a.j.m.AnalyticEnvironmentContext - Application Name is : 76ebcc0c-0cdd-4b7c-b53e-132383197760-429fc52c-f855-4b81-8d7c-ce50e68505c2
2019-03-07 04:34:50,861 7321 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  c.g.p.a.j.m.AnalyticEnvironmentContext - Application Name is : 76ebcc0c-0cdd-4b7c-b53e-132383197760-429fc52c-f855-4b81-8d7c-ce50e68505c2
2019-03-07 04:34:50,868 7328 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  c.g.p.a.j.m.AnalyticEnvironmentContext - Application Name is : 76ebcc0c-0cdd-4b7c-b53e-132383197760-429fc52c-f855-4b81-8d7c-ce50e68505c2
2019-03-07 04:34:51,341 7801 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  org.apache.cxf.endpoint.ServerImpl - Setting the server's publish address to be /
2019-03-07 04:34:51,632 8092 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@718a62d3: startup date [Thu Mar 07 04:34:47 UTC 2019]; root of context hierarchy
2019-03-07 04:34:51,794 8254 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[text/html],custom=[]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2019-03-07 04:34:51,794 8254 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-03-07 04:34:51,822 8282 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-03-07 04:34:51,822 8282 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-03-07 04:34:51,865 8325 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-03-07 04:34:52,030 8490 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.s.j.e.a.AnnotationMBeanExporter - Registering beans for JMX exposure on startup
2019-03-07 04:34:52,035 8495 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase 2147483647
2019-03-07 04:34:52,293 8753 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
2019-03-07 04:34:52,304 8764 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
2019-03-07 04:34:52,310 8770 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.a.tomcat.util.net.NioSelectorPool - Using a shared selector for servlet write/read
2019-03-07 04:34:52,339 8799 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat started on port(s): 8080 (http)
2019-03-07 04:34:52,341 8801 px_correlation_id=na px_zone_id=na px_service=analytic px_user_name= [main] INFO  c.g.p.a.j.JavaBasedAnalyticApplication - Started JavaBasedAnalyticApplication in 7.096 seconds (JVM running for 9.999)
Container became healthy
2019-03-07 04:34:57,377 13837 px_correlation_id=6fed79c1-53b8-4456-bd8f-20d1459f2a18 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [http-nio-8080-exec-2] INFO  c.g.p.a.j.r.c.AnalyticsEngineServiceClientImpl - Started async execution client
2019-03-07 04:34:57,428 13888 px_correlation_id=6fed79c1-53b8-4456-bd8f-20d1459f2a18 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [http-nio-8080-exec-2] INFO  c.g.p.a.j.r.c.AnalyticsEngineServiceClientImpl - AsyncExecutionRequestUri=https://predix-analytics-engine-release.run.aws-usw02-pr.ice.predix.io/api/v1/analytic/execution/async payload={}
429fc52c-f855-4b81-8d7c-ce50e68505c2.run.aws-usw02-pr.ice.predix.io - [2019-03-07T04:34:58.413+0000] "GET /api/v1/analytic/healthcheck HTTP/1.1" 200 0 0 "-" "Java/1.8.0_101" "10.72.11.19:60722" "10.72.53.197:61743" x_forwarded_for:"34.208.124.39, 10.72.11.19" x_forwarded_proto:"https" vcap_request_id:"f8c2536c-f42c-4d96-7b70-481714480a85" response_time:0.007099449 app_id:"1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f" app_index:"0" tenant:"-" x_b3_traceid:"b964cf2b87970abd" x_b3_spanid:"b964cf2b87970abd" x_b3_parentspanid:"-"

2019-03-07 04:34:58,936 15396 px_correlation_id=6fed79c1-53b8-4456-bd8f-20d1459f2a18 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [http-nio-8080-exec-6] INFO  c.g.p.a.j.m.AnalyticEnvironmentContext - Application Name is : 76ebcc0c-0cdd-4b7c-b53e-132383197760-429fc52c-f855-4b81-8d7c-ce50e68505c2
2019-03-07 04:34:58,936 15396 px_correlation_id=6fed79c1-53b8-4456-bd8f-20d1459f2a18 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [http-nio-8080-exec-6] 
2019-03-07 04:40:05,724 322184 px_correlation_id=ef4590bb-0e70-47e3-9e32-25f8f299b9e8 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [http-nio-8080-exec-2] INFO  c.g.p.a.j.m.AnalyticEnvironmentContext - Application Id is : 1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f
2019-03-07 04:40:05,729 322189 px_correlation_id=ef4590bb-0e70-47e3-9e32-25f8f299b9e8 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [SimpleAsyncTaskExecutor-4] INFO  c.g.p.a.j.m.AnalyticAsyncExecutionReceiver - Received analytic execution message: com.ge.predix.analytics.common.dto.AnalyticEngineRequest@1e118338[tenantId=76ebcc0c-0cdd-4b7c-b53e-132383197760, analyticId=429fc52c-f855-4b81-8d7c-ce50e68505c2, analyticExecutionRequestId=04-138d53c1-4093-11e9-bc8b-46c4f5ad01ea-sid-62fbba9e-fd90-4a49-ac3e-41dfd16db78a-0, readUrl=https://predix-analytics-engine-release.run.aws-usw02-pr.ice.predix.io/api/v1/analytic/execution/read/04-138d53c1-4093-11e9-bc8b-46c4f5ad01ea-sid-62fbba9e-fd90-4a49-ac3e-41dfd16db78a-0, writeUrl=https://predix-analytics-engine-release.run.aws-usw02-pr.ice.predix.io/api/v1/analytic/execution/write/04-138d53c1-4093-11e9-bc8b-46c4f5ad01ea-sid-62fbba9e-fd90-4a49-ac3e-41dfd16db78a-0, notificationUrl=https://predix-analytics-engine-release.run.aws-usw02-pr.ice.predix.io/api/v1/analytic/execution/notification/04-138d53c1-4093-11e9-bc8b-46c4f5ad01ea-sid-62fbba9e-fd90-4a49-ac3e-41dfd16db78a-0, oAuthToken=eyJhbGciOiJSUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiI1MWExZmFlOWYzY2E0OTkxOTY1ZjEwZmZkMGVjNjZjMyIsInN1YiI6IjFqMjVsdjFoNnNtbWo0aDB5NDNubG8yY2txeHNpbnIwNXhmbGlyIiwic2NvcGUiOlsiYW5hbHl0aWNzLnpvbmVzLjc2ZWJjYzBjLTBjZGQtNGI3Yy1iNTNlLTEzMjM4MzE5Nzc2MC51c2VyIiwidGltZXNlcmllcy56b25lcy4zYjQwMzIxMC03NThlLTRhMDEtYjk3Yi03ZGRkNjVjYjMyMjUuaW5nZXN0IiwidGltZXNlcmllcy56b25lcy4zYjQwMzIxMC03NThlLTRhMDEtYjk3Yi03ZGRkNjVjYjMyMjUucXVlcnkiLCJ0aW1lc2VyaWVzLnpvbmVzLjNiNDAzMjEwLTc1OGUtNGEwMS1iOTdiLTdkZGQ2NWNiMzIyNS51c2VyIl0sImNsaWVudF9pZCI6IjFqMjVsdjFoNnNtbWo0aDB5NDNubG8yY2txeHNpbnIwNXhmbGlyIiwiY2lkIjoiMWoyNWx2MWg2c21tajRoMHk0M25sbzJja3F4c2lucjA1eGZsaXIiLCJhenAiOiIxajI1bHYxaDZzbW1qNGgweTQzbmxvMmNrcXhzaW5yMDV4ZmxpciIsImdyYW50X3R5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJyZXZfc2lnIjoiZTA2MmZmNmEiLCJpYXQiOjE1NTE5MzM2MDMsImV4cCI6MTU1MTk3NjgwMywiaXNzIjoiaHR0cHM6Ly9kMTczMGFkZS03YzBkLTQ2NTItOGQ0NC1jYjU2M2ZjYzFlMjcucHJlZGl4LXVhYS5ydW4uYXdzLXVzdzAyLXByLmljZS5wcmVkaXguaW8vb2F1dGgvdG9rZW4iLCJ6aWQiOiJkMTczMGFkZS03YzBkLTQ2NTItOGQ0NC1jYjU2M2ZjYzFlMjciLCJhdWQiOlsiMWoyNWx2MWg2c21tajRoMHk0M25sbzJja3F4c2lucjA1eGZsaXIiLCJ0aW1lc2VyaWVzLnpvbmVzLjNiNDAzMjEwLTc1OGUtNGEwMS1iOTdiLTdkZGQ2NWNiMzIyNSIsImFuYWx5dGljcy56b25lcy43NmViY2MwYy0wY2RkLTRiN2MtYjUzZS0xMzIzODMxOTc3NjAiXX0.CUVVsIYgPkknCaLhsabraWNXT6m1Yxb4QhgNcQwjMw5ihTYoEIBVVZ4hrB_h7AL5zE6U3F5QYg4efQNqTDyhvHQutL801SRrwZZnD7ljnr1imGFo9IFtwMgWWyFaBOIQFgxBKFq9uEKhP3QsXZKkpX6w4SRXDH4Sl2wslMFftELZvZ3ysxgt6jCmO7oesRU-Niirb_3dVViwKLXqacokH03I2uyAJWD5JnuYEovmdNnINmZHGxdImUDTVhOr50yr1e_glWX6k6VoAW-6gMzJXTXXBWUODD1_DWgjTR7Aq7iK85f7zELHoDFM7CWxFFGTnOpmdOGCotxW5sbY6WDR3g, clientType=null, correlationId=ef4590bb-0e70-47e3-9e32-25f8f299b9e8, highCapacityTenant=<null>, data=<null>]
2019-03-07 04:40:05,729 322189 px_correlation_id=ef4590bb-0e70-47e3-9e32-25f8f299b9e8 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [SimpleAsyncTaskExecutor-4] INFO  c.g.p.a.j.m.AnalyticAsyncExecutionReceiver - Received analytic execution message - analytic id 429fc52c-f855-4b81-8d7c-ce50e68505c2, analytic request id 04-138d53c1-4093-11e9-bc8b-46c4f5ad01ea-sid-62fbba9e-fd90-4a49-ac3e-41dfd16db78a-0
429fc52c-f855-4b81-8d7c-ce50e68505c2.run.aws-usw02-pr.ice.predix.io - [2019-03-07T04:40:05.724+0000] "POST /api/v1/analytic/execution/engine HTTP/1.1" 200 2558 0 "-" "Apache CXF 3.1.6" "10.72.1.204:17904" "10.72.53.197:61743" x_forwarded_for:"34.208.124.39, 10.72.1.204" x_forwarded_proto:"https" vcap_request_id:"443afad1-e806-40d4-5f53-cfb919304dda" response_time:0.007693907 app_id:"1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f" app_index:"0" tenant:"-" x_b3_traceid:"ca47f777dafdd0cc" x_b3_spanid:"ca47f777dafdd0cc" x_b3_parentspanid:"-"

2019-03-07 04:40:06,010 322470 px_correlation_id=ef4590bb-0e70-47e3-9e32-25f8f299b9e8 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [SimpleAsyncTaskExecutor-4] INFO  com.ge.apm.analytics.ComputeStats - AnalyticInputJson: {"data":{"time_series":{"time_stamp":[1512184000000],"temp_today":[90.0]},"constants":{"threshold":1.0}}}
2019-03-07 04:40:06,022 322482 px_correlation_id=ef4590bb-0e70-47e3-9e32-25f8f299b9e8 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [SimpleAsyncTaskExecutor-4] INFO  com.ge.apm.analytics.ComputeStats - AnalyticResponseJson: {"alerts":{"commonKeyValueStore":{},"commonSensors":[],"commonScanGroupData":{"threshold":1.0},"events":[{"date":1512184000000,"keyValueStore":{},"sensors":["temp_today"],"scanGroupData":{"scores":90.0}}]},"time_series":{"time_stamp":[1512184000000],"mean":[90.0],"deviation":[1.0]}}
2019-03-07 04:40:06,023 322483 px_correlation_id=ef4590bb-0e70-47e3-9e32-25f8f299b9e8 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [SimpleAsyncTaskExecutor-4] INFO  c.g.p.a.j.execution.AESNotification - VcapApplication Configuration is {"application_id":"1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f","application_name":"76ebcc0c-0cdd-4b7c-b53e-132383197760-429fc52c-f855-4b81-8d7c-ce50e68505c2","application_uris":["429fc52c-f855-4b81-8d7c-ce50e68505c2.run.aws-usw02-pr.ice.predix.io"],"application_version":"34a97419-9054-4005-8eae-bc5ca6ca22f4","cf_api":"https://api.system.aws-usw02-pr.ice.predix.io","host":"0.0.0.0","instance_id":"a50ba3f2-1ce8-49a2-459e-d0d4","instance_index":0,"limits":{"disk":2048,"fds":16384,"mem":1024},"name":"76ebcc0c-0cdd-4b7c-b53e-132383197760-429fc52c-f855-4b81-8d7c-ce50e68505c2","port":8080,"space_id":"9b30574b-23a5-4449-b0c7-26f16d1a0bfe","space_name":"76ebcc0c-0cdd-4b7c-b53e-132383197760","uris":["429fc52c-f855-4b81-8d7c-ce50e68505c2.run.aws-usw02-pr.ice.predix.io"],"version":"34a97419-9054-4005-8eae-bc5ca6ca22f4"}
2019-03-07 04:40:06,024 322484 px_correlation_id=ef4590bb-0e70-47e3-9e32-25f8f299b9e8 px_zone_id=76ebcc0c-0cdd-4b7c-b53e-132383197760 px_service=analytic px_user_name= [SimpleAsyncTaskExecutor-4] INFO  c.g.p.a.j.execution.AESNotification - Configured memory is - 1024
429fc52c-f855-4b81-8d7c-ce50e68505c2.run.aws-usw02-pr.ice.predix.io - [2019-03-07T04:40:06.388+0000] "GET /api/v1/analytic/healthcheck HTTP/1.1" 200 0 0 "-" "Java/1.8.0_101" "10.72.1.83:26154" "10.72.53.197:61743" x_forwarded_for:"34.208.124.39, 10.72.1.83" x_forwarded_proto:"https" vcap_request_id:"22128387-24e0-4913-4538-d24208549e09" response_time:0.004521878 app_id:"1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f" app_index:"0" tenant:"-" x_b3_traceid:"81b5d6273d102bb7" x_b3_spanid:"81b5d6273d102bb7" x_b3_parentspanid:"-"

429fc52c-f855-4b81-8d7c-ce50e68505c2.run.aws-usw02-pr.ice.predix.io - [2019-03-07T04:40:09.216+0000] "GET /api/v1/analytic/healthcheck HTTP/1.1" 200 0 0 "-" "Apache CXF 3.1.6" "10.72.1.204:27982" "10.72.53.197:61743" x_forwarded_for:"34.208.124.39, 10.72.1.204" x_forwarded_proto:"https" vcap_request_id:"989e6a60-dd68-4c05-7a69-64ec14ce73be" response_time:0.002774438 app_id:"1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f" app_index:"0" tenant:"-" x_b3_traceid:"08aa6454e6af589e" x_b3_spanid:"08aa6454e6af589e" x_b3_parentspanid:"-"

429fc52c-f855-4b81-8d7c-ce50e68505c2.run.aws-usw02-pr.ice.predix.io - [2019-03-07T04:40:16.968+0000] "GET /api/v1/analytic/execution/async/04-138d53c1-4093-11e9-bc8b-46c4f5ad01ea-sid-62fbba9e-fd90-4a49-ac3e-41dfd16db78a-0/result HTTP/1.1" 200 0 283 "-" "Apache-HttpClient/4.5.3 (Java/1.8.0_152)" "10.72.11.111:19752" "10.72.53.197:61743" x_forwarded_for:"34.208.124.39, 10.72.11.111" x_forwarded_proto:"https" vcap_request_id:"e8fcb852-c80d-46bf-590f-063abb6a07e2" response_time:2.441150172 app_id:"1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f" app_index:"0" tenant:"-" x_b3_traceid:"915b9755bdeadd06" x_b3_spanid:"915b9755bdeadd06" x_b3_parentspanid:"-"

429fc52c-f855-4b81-8d7c-ce50e68505c2.run.aws-usw02-pr.ice.predix.io - [2019-03-07T04:40:19.579+0000] "DELETE /api/v1/analytic/execution/async/04-138d53c1-4093-11e9-bc8b-46c4f5ad01ea-sid-62fbba9e-fd90-4a49-ac3e-41dfd16db78a-0 HTTP/1.1" 204 0 0 "-" "Apache-HttpClient/4.5.3 (Java/1.8.0_152)" "10.72.11.111:19752" "10.72.53.197:61743" x_forwarded_for:"34.208.124.39, 10.72.11.111" x_forwarded_proto:"https" vcap_request_id:"639a9ef4-4494-4279-60a7-9520b34fca6c" response_time:0.195160282 app_id:"1fbd8a6f-dbbe-4b39-b8d1-bf9a7fe7d98f" app_index:"0" tenant:"-" x_b3_traceid:"7229fc83a49ff7b8" x_b3_spanid:"7229fc83a49ff7b8" x_b3_parentspanid:"-"

Delete Supporting Files from the Analytic Template

You can delete a supporting file that is no longer needed from the analytic template.

Procedure

  1. In the module navigation menu, navigate to Analytics > Analytics Templates.
  2. In the Search pane, locate and select an analytic template to access it.
  3. Select the Analytics Template tab.
  4. Hover over a file listed in the SUPPORTING FILES subsection, then select X. You must confirm or cancel your choice in the window that appears.
  5. Select Save to save changes to the analytic template. Select Cancel to discard all changes. You must confirm or cancel your choice in the window that appears.

Results

After a successful save operation, the supporting file is removed from the list.

Add Analytic Definitions to the Analytic Template

Use the analytic template to define inputs, constants, and outputs found within the analytic runtime.

About This Task

This task does not apply if the template was ingested through the Import from file option on the New Analytic page. The configuration in the ingestion .json determines whether or not the configurations can be changed via the UI.

You will need to provide definitions for inputs and outputs in the analytic template. You can also find the constants and their values in the analytic. The analytic template expects outputs events if your analytic may produce alerts. At least one input and one output are required to proceed.

If you are adding inputs individually, make sure you indicate if the input is required. This information is used during I/O Mapping for Orchestrations.
Note: If you choose a SmartSignal runtime when creating an analytic, the Required column is read-only.
If you are using .csv files to add definitions, the system does not permit the file to be loaded if the file format or data type is invalid. In this case, a window displaying the invalid entries appears, allowing you to fix the indicated errors and retry. An input required indicator is needed for .csv files.
Important: Once the deployment has been completed, the output tag alias cannot be edited.

Procedure

  • To manually enter definitions for the inputs, constants, and outputs:
    1. In Analytics Templates section, select an analytic in the catalog.
    2. Select in the Input Definition, Constants, and Output Definition subsections to enter values one at a time.
    3. In the Output Events subsection, hover over the Name box and enter an alert template name to add a new output event.
      Important: The output name is case-sensitive and must match an existing alert template name. If the alert template does not exist, the analytic fails to run.
  • To upload .csv files for definitions for the inputs, constants and outputs:
    1. In the Analytic Template section, select in the Input Definition, Constants, and Output Definition subsections to download a template used to create the definitions file for bulk upload.
      After you have created .csv files, select in each subsection, then select the Upload a CSV box to upload format definitions for each type one at a time.
      Tip:
      • Each input definition, output definition, and constant name must match those defined in the developed analytic.
      • The data types for input definitions, output definitions, and constants must match the expected data. Definitions use INTEGER, BOOLEAN, STRING, and DOUBLE data types. For example, when defining a tag_temperature input tag that produces data as doubles, you must define the DataType as Double.
      • In the output definition, tag names must match the tag names expected in the time series data.
    2. In the Output Events subsection, select the Name box and enter an alert template name to add a new output event.
      Important: The output name is case-sensitive and must match an existing alert template name. If the alert template does not exist, the analytic fails to run.

Analytic Definition Files

You can create .csv files containing the relevant inputs, constants, and outputs for your analytic instead of entering them manually in the analytic template. To do this, you must save a copy of the .csv template and add the appropriate definitions before uploading it to the analytic template. If you upload a file with the wrong format or incorrect values, a dialog box displaying the invalid entries appears, and the file is not loaded. You can fix the indicated errors, and retry.
Tip: You can use the apm-analytic-csv-generator found on GitHub if you have access. You can request access from your support team. The .csv generator parses a sample .json analytic input file and writes out input and constant .csv files.

Define Analytic Input CSV

Before You Begin

You have created an analytic in the analytic catalog.

About This Task

Use this procedure if you want to configure multiple inputs through .csv upload. You can skip this procedure if you want to add inputs directly through the UI.

Configure the template to specify input tags for the analytic you are adding or have added to the analytic catalog. This information is needed to run the analytic.

Procedure
  1. In the Analytic Template section, select in the Input Definitionsubsection to download a copy of the .csv template and save it locally.
  2. Rename the file with a name related to the analytic.
    For example, rename the AnalyticInputDefTemplate.csv file as AnalyticInputDef_data_wind_trend.csv and save it locally.
  3. Open the saved file in a CSV editor.
  4. Verify that the template matches the following definition guidelines. They can be defined in spreadsheet columns or as comma-separated values.
    Table 1. Input Definition Guidelines
    This definitionUses this guideline
    NameA valid tag name that matches the analytic input parameter. It must match the regular expression pattern ^[A-Za-z0-9-_]+$.
    DescriptionThe tag description. If there is no description for the tag, define blank entries as empty table cells, or offset them in a comma-delimited set (, ,).
    UnitsThe engineering unit that matches the engineering unit name in the conversion database.
    Data TypeThe value must be one of the following data types:
    • STRING
      Note: You must select string data type for data of type string, character, enum, or grid.
    • INTEGER
    • DOUBLE
    • BOOLEAN
    Data FormatThe format of the data being retrieved or written as part of the analytics computation logic. The two acceptable values are Asset Attributes and APM Timeseries.
    Entity TypeThe mapping level in the asset business hierarchy. During the I/O mapping step in deployment, the mapping level tells Application Analytics to retrieve the tags and attributes of all assets and their children starting at the defined Entity Type. For example, if you configure the Entity Type for your analytic input at the Site level, then all tags and attributes of the Site and its children become available for mapping during deployment.
    RequiredThe value must be checked or unchecked. This indicates whether the input is required.
    Note: If you will be using Edge runtime and if incoming data types are not the same as the data types required by an Edge analytic, automatic data type conversion will be attempted.
  5. Make any required modifications and save the file.
What To Do Next
Upload the template to the new analytic created in the catalog.

Define Analytic Constants CSV

Before You Begin

You have created an analytic in the analytic catalog.

About This Task

Use this procedure if you want to configure multiple constants through .csv upload. You can skip this procedure if you want to add constants on the UI.

Configure the template to specify constants for the analytics you are adding or have added to the analytic catalog. This information is needed to run the analytics.

Procedure
  1. In the Analytic Template section, select in the Constantssubsection to download a copy of the .csv template and save it locally.
  2. Rename the file with a name related to the analytic.
    For example, rename the AnalyticConstantsTemplate.csv file as AnalyticConstantsTemplate_data_wind_trend.csv and save it locally.
  3. Open the saved file in a CSV editor.
  4. Verify that the template matches the following definition guidelines. They can be defined in spreadsheet columns or as comma-separated values.
    Table 2. Constants Guidelines
    This definitionUses this guideline
    NameA valid tag name must match the analytic constant parameter. It must match the regular expression pattern ^[A-Za-z0-9-_]+$.
    DescriptionThe tag description or null. If there is no description for the tag, define blank entries as empty table cells, or offset them in a comma-delimited set (, ,).
    UnitsThe engineering unit that matches the engineering unit name in the conversion database.
    Data TypeThe value must be one of the following data types:
    • STRING
    • INTEGER
    • DOUBLE
    • BOOLEAN
    Data FormatThe format of the data being retrieved or written as part of the analytics computation logic. The two acceptable values are Asset Attributes and APM Timeseries.
    Entity TypeThe mapping level in the asset business hierarchy. During the I/O mapping step in deployment, the mapping level tells Application Analytics to retrieve the attributes of all assets and their children starting at the defined Entity Type. For example, if you configure the Entity Type for your analytic constant at the Site level, then all attributes of the Site and its children become available for mapping during deployment.
    Value (optional)If there is no default value, you must define blank entries as empty table cells or offset them in a comma-delimited set (, , ).
  5. Make any required modifications and save the file.
What To Do Next
Upload the template to the new analytic created in the catalog.

Define Analytic Output CSV

Before You Begin
You have created an analytic in the analytic catalog.
About This Task

Use this procedure if you want to configure multiple outputs through .csv upload. You can skip this procedure if you want to add outputs on the UI.

Configure the template to specify output tags for the analytic you are adding or have added to the analytic catalog. This information is needed to run the analytic.

Procedure
  1. In the Analytic Template section, select in the Outputssubsection to download a copy of the .csv template and save it locally.
  2. Rename the file with a name related to the analytic.
    For example, rename the output-def.csv file as output-def_data_wind_trend.csv and save it locally.
  3. Open the saved file in a CSV editor.
  4. Verify that the template matches the following definition guidelines. They can be defined in spreadsheet columns or as comma-separated values. Make sure your outputs match your analytic definition.
    Table 3. Outputs Definition Guidelines
    This definitionUses this guideline
    NameA valid tag name that matches the analytic constant parameter. It must match the regular expression pattern ^[A-Za-z0-9-_]+$.
    DescriptionThe tag description or null. If there is no description for the tag, define blank entries as empty table cells, or offset them in a comma-delimited set (, ,).
    UnitsThe engineering unit that matches the engineering unit name in the conversion database.
    Data TypeThe value must be one of the following data types:
    • STRING
    • INTEGER
    • DOUBLE
    • BOOLEAN
    Data FormatThe format of the data being retrieved or written as part of the analytics computation logic. The two acceptable values are Asset Attributes and APM Timeseries.
    Entity TypeThe mapping level in the asset business hierarchy. During the I/O mapping step in deployment, the mapping level tells Application Analytics to retrieve the tags and attributes of all assets and their children starting at the defined Entity Type. For example, if you configure the Entity Type for your analytic output at the Segment level, then all tags and attributes of the Segments and its children become available for mapping during deployment.
  5. Make any required modifications and save the file.
What To Do Next
Upload the template to the new analytic created in the catalog.