TEST FOR CL FLOW WITHIN DCAE Integration SB04 Environment - 10/02 1) Ensuring topic are created and no feed []vv770d@pod-onap-01-vjhost:~$ curl http://10.12.5.145:30227/events/unauthenticated.DCAE_CL_OUTPUT/vv/1 []vv770d@pod-onap-01-vjhost:~$ date Tue Oct 2 18:33:52 UTC 2018 vv770d@pod-onap-01-vjhost:~$ curl http://10.12.5.145:30227/events/unauthenticated.VES_MEASUREMENT_OUTPUT/vv/1 2) Send data into the VES Collector on node port 30235 []vv770d@pod-onap-01-vjhost:~curl -i -u 'sample1:sample1' -X POST -d @f5.txt --header "Content-Type: application/json" http://10.12.5.145:30235//eventListener/v5 -k HTTP/1.1 202 Content-Type: application/json Content-Length: 8 Date: Tue, 02 Oct 2018 18:34:09 GMT 3) Verification of VES Collector o/p Acceptedvv770d@pod-onap-01-vjhost:http://10.12.5.145:30227/events/unauthenticated.VES_MEASUREMENT_OUTPUT/vv/1er/v5 -k ["{\"event\":{\"commonEventHeader\":{\"startEpochMicrosec\":1507750704126521,\"sourceId\":\"4c32fa09-83e7-43cf-8bba-c72557afe408\",\"eventId\":\"TrafficStats_1.2.3.4\",\"nfcNamingCode\":\"vVNF\",\"reportingEntityId\":\"No UUID available\",\"internalHeaderFields\":{\"collectorTimeStamp\":\"Tue, 10 02 2018 06:34:10 UTC\"},\"eventType\":\"HTTP request rate\",\"priority\":\"Normal\",\"version\":1.2,\"reportingEntityName\":\"fwll\",\"sequence\":85,\"domain\":\"measurementsForVfScaling\",\"lastEpochMicrosec\":1507750714317473,\"eventName\":\"vFirewallBroadcastPackets\",\"sourceName\":\"zdfw1fwl01fwl01\",\"nfNamingCode\":\"vVNF\"},\"measurementsForVfScalingFields\":{\"cpuUsageArray\":[{\"percentUsage\":0,\"cpuIdentifier\":\"cpu1\",\"cpuIdle\":100,\"cpuUsageSystem\":0,\"cpuUsageUser\":0}],\"measurementInterval\":10,\"requestRate\":2256,\"vNicUsageArray\":[{\"transmittedOctetsDelta\":0,\"receivedTotalPacketsDelta\":1002,\"vNicIdentifier\":\"eth0\",\"valuesAreSuspect\":\"true\",\"transmittedTotalPacketsDelta\":0,\"receivedOctetsDelta\":61200}],\"measurementsForVfScalingVersion\":2.1}}}"]vv770d@pod-onap-01-vjhost:~$ 4) Verification of TCA output to Policy vv770d@pod-onap-01-vjhost:~$ curl http://10.12.5.145:30227/events/unauthenticated.DCAE_CL_OUTPUT/vv/1 ["{\"closedLoopEventClient\":\"DCAE_INSTANCE_ID.dcae-tca\",\"policyVersion\":\"v0.0.1\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyScope\":\"DCAE\",\"target_type\":\"VNF\",\"AAI\":{\"generic-vnf.vnf-name\":\"zdfw1fwl01fwl01\"},\"closedLoopAlarmStart\":1507750704126521,\"closedLoopEventStatus\":\"ONSET\",\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"target\":\"generic-vnf.vnf-name\",\"requestID\":\"7f9f174c-337c-449c-bfe4-8dcf6a8323d7\",\"from\":\"DCAE\"}"] 5) TCA enrichment logs 10/02/2018 14:32:18 DEBUG FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAAIEnrichmentFlowlet#93 Performing A&AI Enrichment of ONSET Alert: {"closedLoopAlarmStart":1507750704126521,"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","closedLoopEventClient":"DCAE_INSTANCE_ID.dcae-tca","closedLoopEventStatus":"ONSET","from":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyScope":"DCAE","policyVersion":"v0.0.1","requestID":"94c925e0-5388-4a42-831e-1a2e9bf468d6","target":"generic-vnf.vnf-name","version":"1.0.2","AAI":{"generic-vnf.vnf-name":"zdfw1fwl01fwl01"},"target_type":"VNF"} 10/02/2018 14:32:18 DEBUG FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAAIEnrichmentFlowlet#97 A&AI Source Name: zdfw1fwl01fwl01, Control Loop Schema Type: VNF for ONSET Alert: {"closedLoopAlarmStart":1507750704126521,"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","closedLoopEventClient":"DCAE_INSTANCE_ID.dcae-tca","closedLoopEventStatus":"ONSET","from":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyScope":"DCAE","policyVersion":"v0.0.1","requestID":"94c925e0-5388-4a42-831e-1a2e9bf468d6","target":"generic-vnf.vnf-name","version":"1.0.2","AAI":{"generic-vnf.vnf-name":"zdfw1fwl01fwl01"},"target_type":"VNF"} 10/02/2018 14:32:18 ERROR FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClientImpl$1#193 Unable to fetch response from A&AI API. A&AI Response Code: 403, A&AI Response Message: {"requestError":{"policyException":{"messageId":"POL3300","text":"Unauthorized (msg=%1) (ec=%2)","variables":["Unauthorized","ERR.5.1.3300"]}}} 10/02/2018 14:32:18 WARN FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.tca.utils.TCAUtils#961 No A&AI Enrichment possible for AAI: AAI(genericVNFName=zdfw1fwl01fwl01, genericServerName=null). A&AI Enrichment details are absent.Skipping Enrichment for alert message:{"closedLoopAlarmStart":1507750704126521,"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","closedLoopEventClient":"DCAE_INSTANCE_ID.dcae-tca","closedLoopEventStatus":"ONSET","from":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyScope":"DCAE","policyVersion":"v0.0.1","requestID":"94c925e0-5388-4a42-831e-1a2e9bf468d6","target":"generic-vnf.vnf-name","version":"1.0.2","AAI":{"generic-vnf.vnf-name":"zdfw1fwl01fwl01"},"target_type":"VNF"} 10/02/2018 14:32:18 DEBUG FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAAIEnrichmentFlowlet#111 Emitting Alert after A&AI Enrichment: {"closedLoopAlarmStart":1507750704126521,"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","closedLoopEventClient":"DCAE_INSTANCE_ID.dcae-tca","closedLoopEventStatus":"ONSET","from":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyScope":"DCAE","policyVersion":"v0.0.1","requestID":"94c925e0-5388-4a42-831e-1a2e9bf468d6","target":"generic-vnf.vnf-name","version":"1.0.2","AAI":{"generic-vnf.vnf-name":"zdfw1fwl01fwl01"},"target_type":"VNF"} 10/02/2018 14:32:18 DEBUG FlowletProcessDriver-TCAVESAlertsSinkFlowlet-0-executor:co.cask.cdap.data2.metadata.writer.BasicLineageWriter#63 Writing access for run program_run:cdap_tca_hi_lo.dcae-tca.-SNAPSHOT.flow.TCAVESCollectorFlow.d5339729-c5e9-11 Current control loop config {"app_config": {"tcaVESAlertsTableTTLSeconds": "1728000", "thresholdCalculatorFlowletInstances": "2", "tcaAlertsAbatementTableTTLSeconds": "1728000", "tcaAlertsAbatementTableName": "TCAAlertsAbatementTable", "appName": "dcae-tca", "appDescription": "DCAE Analytics Threshold Crossing Alert Application", "tcaSubscriberOutputStreamName": "TCASubscriberOutputStream", "tcaVESMessageStatusTableTTLSeconds": "86400", "tcaVESAlertsTableName": "TCAVESAlertsTable", "tcaVESMessageStatusTableName": "TCAVESMessageStatusTable"}, "app_preferences": {"aaiEnrichmentIgnoreSSLCertificateErrors": "true", "publisherMaxRecoveryQueueSize": "100000", "subscriberConsumerId": "c12", "aaiVNFEnrichmentAPIPath": "/aai/v11/network/generic-vnfs/generic-vnf", "aaiEnrichmentUserPassword": "demo123456!", "publisherHostName": "message-router.onap", "aaiEnrichmentPortNumber": "8443", "publisherPollingInterval": "20000", "subscriberProtocol": "http", "aaiEnrichmentHost": "aai.onap.svc.cluster.local", "enableRedisCaching": false, "subscriberContentType": "application/json", "subscriberHostName": "message-router.onap", "redisHosts": "dcae-redis.onap.svc.cluster.local:6379", "publisherContentType": "application/json", "subscriberTopicName": "unauthenticated.VES_MEASUREMENT_OUTPUT", "aaiVMEnrichmentAPIPath": "/aai/v11/search/nodes-query", "publisherMaxBatchSize": "1", "publisherProtocol": "http", "publisherHostPort": "3904", "subscriberMessageLimit": "-1", "tca_policy": "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}", "enableAAIEnrichment": true, "publisherTopicName": "unauthenticated.DCAE_CL_OUTPUT", "subscriberPollingInterval": "30000", "aaiEnrichmentProtocol": "https", "enableAlertCEFFormat": "false", "subscriberConsumerGroup": "OpenDCAE-c12", "subscriberHostPort": "3904", "aaiEnrichmentUserName": "dcae@dcae.onap.org", "subscriberTimeoutMS": "-1"}} 6) Incorrect AAI credentials 10/02/2018 15:56:52 DEBUG FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAAIEnrichmentFlowlet#93 Performing A&AI Enrichment of ONSET Alert: {"closedLoopAlarmStart":1507750704126521,"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","closedLoopEventClient":"DCAE_INSTANCE_ID.dcae-tca","closedLoopEventStatus":"ONSET","from":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyScope":"DCAE","policyVersion":"v0.0.1","requestID":"ef944f95-7f60-471c-8a75-06880ec14a7f","target":"generic-vnf.vnf-name","version":"1.0.2","AAI":{"generic-vnf.vnf-name":"zdfw1fwl01fwl01"},"target_type":"VNF"} 10/02/2018 15:56:52 DEBUG FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAAIEnrichmentFlowlet#97 A&AI Source Name: zdfw1fwl01fwl01, Control Loop Schema Type: VNF for ONSET Alert: {"closedLoopAlarmStart":1507750704126521,"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","closedLoopEventClient":"DCAE_INSTANCE_ID.dcae-tca","closedLoopEventStatus":"ONSET","from":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyScope":"DCAE","policyVersion":"v0.0.1","requestID":"ef944f95-7f60-471c-8a75-06880ec14a7f","target":"generic-vnf.vnf-name","version":"1.0.2","AAI":{"generic-vnf.vnf-name":"zdfw1fwl01fwl01"},"target_type":"VNF"} 10/02/2018 15:56:52 ERROR FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.aai.service.AAIEnrichmentClientImpl$1#193 Unable to fetch response from A&AI API. A&AI Response Code: 403, A&AI Response Message: {"requestError":{"policyException":{"messageId":"POL3300","text":"Unauthorized (msg=%1) (ec=%2)","variables":["Unauthorized","ERR.5.1.3300"]}}} 10/02/2018 15:56:52 WARN FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.tca.utils.TCAUtils#961 No A&AI Enrichment possible for AAI: AAI(genericVNFName=zdfw1fwl01fwl01, genericServerName=null). A&AI Enrichment details are absent.Skipping Enrichment for alert message:{"closedLoopAlarmStart":1507750704126521,"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","closedLoopEventClient":"DCAE_INSTANCE_ID.dcae-tca","closedLoopEventStatus":"ONSET","from":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyScope":"DCAE","policyVersion":"v0.0.1","requestID":"ef944f95-7f60-471c-8a75-06880ec14a7f","target":"generic-vnf.vnf-name","version":"1.0.2","AAI":{"generic-vnf.vnf-name":"zdfw1fwl01fwl01"},"target_type":"VNF"} 10/02/2018 15:56:52 DEBUG FlowletProcessDriver-TCAVESAAIEnrichmentFlowlet-0-executor:org.onap.dcae.apod.analytics.cdap.tca.flowlet.TCAVESAAIEnrichmentFlowlet#111 Emitting Alert after A&AI Enrichment: {"closedLoopAlarmStart":1507750704126521,"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","closedLoopEventClient":"DCAE_INSTANCE_ID.dcae-tca","closedLoopEventStatus":"ONSET","from":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyScope":"DCAE","policyVersion":"v0.0.1","requestID":"ef944f95-7f60-471c-8a75-06880ec14a7f","target":"generic-vnf.vnf-name","version":"1.0.2","AAI":{"generic-vnf.vnf-name":"zdfw1fwl01fwl01"},"target_type":"VNF"} 10/02/2018 15:56:52 DEBUG FlowletProcessDriver-TCAVESAlertsSinkFlowlet-0-executor:org.onap.dcae.apod.analytics.cdap.common.persistance.tca.TCAVESAlertsPersister#65 Finished persisting VES Alert message ID: 0000000000001538510212779 in VES Alerts table