-+--------------------------------------------------------------------------------------------------------------------------------------------+
-| { |
-| |
-| "publisherContentType" : "application/json", |
-| |
-| "publisherHostName" : "10.12.25.96", |
-| |
-| "publisherHostPort" : "3904", |
-| |
-| "publisherMaxBatchSize" : "1", |
-| |
-| "publisherMaxRecoveryQueueSize" : "100000", |
-| |
-| "publisherPollingInterval" : "20000", |
-| |
-| "publisherProtocol" : "http", |
-| |
-| "publisherTopicName" : "unauthenticated.DCAE\_CL\_OUTPUT", |
-| |
-| "subscriberConsumerGroup" : "OpenDCAE-c1", |
-| |
-| "subscriberConsumerId" : "c1", |
-| |
-| "subscriberContentType" : "application/json", |
-| |
-| "subscriberHostName" : "10.12.25.96", |
-| |
-| "subscriberHostPort" : "3904", |
-| |
-| "subscriberMessageLimit" : "-1", |
-| |
-| "subscriberPollingInterval" : "20000", |
-| |
-| "subscriberProtocol" : "http", |
-| |
-| "subscriberTimeoutMS" : "-1", |
-| |
-| "subscriberTopicName" : "unauthenticated.SEC\_MEASUREMENT\_OUTPUT", |
-| |
-| "enableAAIEnrichment" : false, |
-| |
-| "aaiEnrichmentHost" : "10.12.25.72", |
-| |
-| "aaiEnrichmentPortNumber" : 8443, |
-| |
-| "aaiEnrichmentProtocol" : "https", |
-| |
-| "aaiEnrichmentUserName" : "DCAE", |
-| |
-| "aaiEnrichmentUserPassword" : "DCAE", |
-| |
-| "aaiEnrichmentIgnoreSSLCertificateErrors" : false, |
-| |
-| "aaiVNFEnrichmentAPIPath" : "/aai/v11/network/generic-vnfs/generic-vnf", |
-| |
-| "aaiVMEnrichmentAPIPath" : "/aai/v11/search/nodes-query", |
-| |
-| "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\\" |
-| |
-| }] |
-| |
-| }] |
-| |
-| }" |
-| |
-| } |
-+============================================================================================================================================+
-+--------------------------------------------------------------------------------------------------------------------------------------------+
-
- Note: Dmaap configuration are specified on this file on
- publisherHostName and subscriberHostName. To be changed as
- required\*\*
-
-7. Copy below script to CDAP server (this gets latest image from nexus
- and deploys TCA application) and execute it
-
-+--------------------------------------------------------------------------------------------------------------------------------------------------+
-| #!/bin/sh |
-| |
-| TCA\_JAR=dcae-analytics-cdap-tca-2.0.0.jar |
-| |
-| rm -f /home/ubuntu/$TCA\_JAR |
-| |
-| cd /home/ubuntu/ |
-| |
-| wget https://nexus.onap.org/service/local/repositories/staging/content/org/onap/dcaegen2/analytics/tca/dcae-analytics-cdap-tca/2.0.0/$TCA\_JAR |
-| |
-| if [ $? -eq 0 ]; then |
-| |
-| if [ -f /home/ubuntu/$TCA\_JAR ]; then |
-| |
-| echo "Restarting TCA CDAP application using $TCA\_JAR artifact" |
-| |
-| else |
-| |
-| echo "ERROR: $TCA\_JAR missing" |
-| |
-| exit 1 |
-| |
-| fi |
-| |
-| else |
-| |
-| echo "ERROR: $TCA\_JAR not found in nexus" |
-| |
-| exit 1 |
-| |
-| fi |
-| |
-| # stop programs |
-| |
-| curl -X POST http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/stop |
-| |
-| curl -X POST http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/stop |
-| |
-| curl -X POST http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/stop |
-| |
-| # delete application |
-| |
-| curl -X DELETE http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca |
-| |
-| # delete artifact |
-| |
-| curl -X DELETE http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/artifacts/dcae-analytics-cdap-tca/versions/2.0.0 |
-| |
-| # load artifact |
-| |
-| curl -X POST --data-binary @/home/ubuntu/$TCA\_JAR http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/artifacts/dcae-analytics-cdap-tca |
-| |
-| # create app |
-| |
-| curl -X PUT -d @/home/ubuntu/tca\_app\_config.json http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca |
-| |
-| # load preferences |
-| |
-| curl -X PUT -d @/home/ubuntu/tca\_app\_preferences.json http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/preferences |
-| |
-| # start programs |
-| |
-| curl -X POST http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/start |
-| |
-| curl -X POST http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/start |
-| |
-| curl -X POST http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/start |
-| |
-| echo |
-| |
-| # get status of programs |
-| |
-| curl http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/status |
-| |
-| curl http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/status |
-| |
-| curl http://localhost:11015/v3/namespaces/cdap\_tca\_hi\_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/status |
-| |
-| echo |
-+==================================================================================================================================================+
-+--------------------------------------------------------------------------------------------------------------------------------------------------+
+.. code-block:: json
+
+ {
+ "publisherContentType" : "application/json",
+ "publisherHostName" : "10.12.25.96",
+ "publisherHostPort" : "3904",
+ "publisherMaxBatchSize" : "1",
+ "publisherMaxRecoveryQueueSize" : "100000",
+ "publisherPollingInterval" : "20000",
+ "publisherProtocol" : "http",
+ "publisherTopicName" : "unauthenticated.DCAE_CL_OUTPUT",
+ "subscriberConsumerGroup" : "OpenDCAE-c1",
+ "subscriberConsumerId" : "c1",
+ "subscriberContentType" : "application/json",
+ "subscriberHostName" : "10.12.25.96",
+ "subscriberHostPort" : "3904",
+ "subscriberMessageLimit" : "-1",
+ "subscriberPollingInterval" : "20000",
+ "subscriberProtocol" : "http",
+ "subscriberTimeoutMS" : "-1",
+ "subscriberTopicName" : "unauthenticated.SEC_MEASUREMENT_OUTPUT",
+ "enableAAIEnrichment" : false,
+ "aaiEnrichmentHost" : "10.12.25.72",
+ "aaiEnrichmentPortNumber" : 8443,
+ "aaiEnrichmentProtocol" : "https",
+ "aaiEnrichmentUserName" : "DCAE",
+ "aaiEnrichmentUserPassword" : "DCAE",
+ "aaiEnrichmentIgnoreSSLCertificateErrors" : false,
+ "aaiVNFEnrichmentAPIPath" : "/aai/v11/network/generic-vnfs/generic-vnf",
+ "aaiVMEnrichmentAPIPath" : "/aai/v11/search/nodes-query",
+ "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"
+ }]
+ }]
+ }
+ }
+
+
+.. Note: Dmaap configuration are specified on this file on
+ publisherHostName and subscriberHostName. To be changed as
+ required\*\*
+
+7. Copy below script to CDAP server (this gets latest image from nexus and deploys TCA application) and execute it
+
+.. code-block:: bash
+
+ #!/bin/sh
+ TCA_JAR=dcae-analytics-cdap-tca-2.0.0.jar
+ rm -f /home/ubuntu/$TCA_JAR
+ cd /home/ubuntu/
+ wget https://nexus.onap.org/service/local/repositories/staging/content/org/onap/dcaegen2/analytics/tca/dcae-analytics-cdap-tca/2.0.0/$TCA_JAR
+ if [ $? -eq 0 ]; then
+ if [ -f /home/ubuntu/$TCA_JAR ]; then
+ echo “Restarting TCA CDAP application using $TCA_JAR artifact”
+ else
+ echo “ERROR: $TCA_JAR missing”
+ exit 1
+ fi
+ else
+ echo “ERROR: $TCA_JAR not found in nexus”
+ exit 1
+ fi
+ # stop programs
+ curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/stop
+ curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/stop
+ curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/stop
+ # delete application
+ curl -X DELETE http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca
+ # delete artifact
+ curl -X DELETE http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/artifacts/dcae-analytics-cdap-tca/versions/2.0.0
+ # load artifact
+ curl -X POST –data-binary @/home/ubuntu/$TCA_JAR http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/artifacts/dcae-analytics-cdap-tca
+ # create app
+ curl -X PUT -d @/home/ubuntu/tca_app_config.json http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca
+ # load preferences
+ curl -X PUT -d @/home/ubuntu/tca_app_preferences.json http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/preferences
+ # start programs
+ curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/start
+ curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/start
+ curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/start
+ echo
+ # get status of programs
+ curl http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/status
+ curl http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/status
+ curl http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/status
+ echo
+