From 7a2c23b3ad83eab0eed5b990c70a1603447d5ee5 Mon Sep 17 00:00:00 2001 From: "Singla, Rajiv (rs153v)" Date: Wed, 15 Aug 2018 11:46:10 -0400 Subject: Standalone TCA with EELF Logger Issue-ID: DCAEGEN2-633 Change-Id: I4da76b532021c0d6248455e7bd6e77f4614c35a7 Signed-off-by: Singla, Rajiv (rs153v) --- dcae-analytics/dpo/tca/commands | 19 +++ dcae-analytics/dpo/tca/dmaap.json | 24 +++ dcae-analytics/dpo/tca/tca_output.json | 109 +++++++++++++ dcae-analytics/dpo/tca/tca_spec.json | 269 +++++++++++++++++++++++++++++++++ 4 files changed, 421 insertions(+) create mode 100644 dcae-analytics/dpo/tca/commands create mode 100644 dcae-analytics/dpo/tca/dmaap.json create mode 100644 dcae-analytics/dpo/tca/tca_output.json create mode 100644 dcae-analytics/dpo/tca/tca_spec.json (limited to 'dcae-analytics/dpo/tca') diff --git a/dcae-analytics/dpo/tca/commands b/dcae-analytics/dpo/tca/commands new file mode 100644 index 0000000..168681b --- /dev/null +++ b/dcae-analytics/dpo/tca/commands @@ -0,0 +1,19 @@ +unset http_proxy; unset https_proxy + +dcae_cli data_format add --update tca_output.json +dcae_cli component add --update tca_spec.json +dcae_cli component run --dmaap-file dmaap.json --force docker.tca + +# publish +dcae_cli data_format publish "TCA Alert Definition" +dcae_cli component publish docker.tca + +# to un-deploy +dcae_cli component undeploy docker.tca + +# to inspect +dcae_cli component show docker.tca +dcae_cli component list +dcae_cli component list --deployed + +dcae_cli catalog list --expanded diff --git a/dcae-analytics/dpo/tca/dmaap.json b/dcae-analytics/dpo/tca/dmaap.json new file mode 100644 index 0000000..6ee67d2 --- /dev/null +++ b/dcae-analytics/dpo/tca/dmaap.json @@ -0,0 +1,24 @@ +{ + "tca_handle_in": { + "aaf_username": "USER", + "aaf_password": "PASSWORD", + "type": "message_router", + "dmaap_info": { + "client_role": "ves-subscriber", + "client_id": "ves-sub-1", + "location": "ecomp", + "topic_url": "https://HOSTNAME:3905/events/org.onap.dcae.dmaap.mtnje2.DcaeTestVESSub" + } + }, + "tca_handle_out": { + "aaf_username": "USER", + "aaf_password": "PASSWORD", + "type": "message_router", + "dmaap_info": { + "client_role": "policy-publisher", + "client_id": "policy-pub-1", + "location": "ecomp", + "topic_url": "https://HOSTNAME:3905/events/org.onap.dcae.dmaap.mtnje2.DcaeTestVESPub" + } + } +} diff --git a/dcae-analytics/dpo/tca/tca_output.json b/dcae-analytics/dpo/tca/tca_output.json new file mode 100644 index 0000000..f593fda --- /dev/null +++ b/dcae-analytics/dpo/tca/tca_output.json @@ -0,0 +1,109 @@ +{ + "self": { + "name": "TCA Alert Definition", + "version": "1.0.1", + "description": "The format of the output event from TCA" + }, + "dataformatversion": "1.0.0", + "jsonschema": { + "name": "TCA Alert", + "version": "1.0.0", + "properties": { + "version": { + "type": "string", + "enum": [ + "1.0.2" + ] + }, + "closedLoopControlName": { + "type": "string", + "description": "This is the unique ID for the Control Loop. It is created by the CLAMP platform during Control Loop design" + }, + "requestID": { + "type": "string", + "description": "For the control loop, when an instance of the Control Loop occurs, this unique ID must be created. The same ID must be forwarded for both the ONSET and the ABATED control loop messages" + }, + "closedLoopEventStatus": { + "type": "string", + "description": "This is the status of the closedLoopControlName/requestID pair", + "enum": [ + "ONSET", + "ABATED" + ] + }, + "closedLoopAlarmStart": { + "type": "string", + "description": "When the alarm was first detected" + }, + "closedLoopAlarmEnd": { + "type": "string", + "description": "When the alarm was cleared. This field need only be present in the ABATED message" + }, + "closedLoopEventClient": { + "type": "string", + "description": "For monitoring/logging/auditing purposes, if there is an instance ID of the DCAE micro service this field should be populated with it" + }, + "policyVersion": { + "type": "string", + "description": "The version of the Policy driving the DCAE Micro service. Should be a part of the configuration policy setup by CLAMP and passed by DCAE controller" + }, + "policyName": { + "type": "string", + "description": "The name of the Policy driving the DCAE micro service. Should be a part of the configuration policy setup by CLAMP and passed by DCAE controller" + }, + "policyScope": { + "type": "string", + "description": "The scope of the Policy driving the DCAE micro service. Should be a part of the configuration policy setup by CLAMP and passed by DCAE controller" + }, + "from": { + "type": "string", + "description": "The ONAP platform component publishing this message", + "enum": [ + "DCAE" + ] + }, + "target_type": { + "type": "string", + "description": "The type of the target: VM or VNF", + "enum": [ + "VNF", + "VM" + ] + }, + "target": { + "type": "string", + "description": "This is the name of the field within the A&AI sub-tag that indicates the actual entity Node details. There should be a matching node field within the A&AI subtag holding this value", + "enum": [ + "generic-vnf.vnf-id", + "vserver.vserver-name" + ] + }, + "AAI": { + "description": "Contains the A&AI Node-Attribute list", + "anyOf": [ + { + "generic-vnf.vnf-id": { + "type": "string" + } + }, + { + "vserver.vserver-name": { + "type": "string" + } + } + ] + } + }, + "required": [ + "version", + "closedLoopControlName", + "requestID", + "closedLoopEventStatus", + "closedLoopAlarmStart", + "from", + "target_type", + "target", + "AAI" + ] + } +} diff --git a/dcae-analytics/dpo/tca/tca_spec.json b/dcae-analytics/dpo/tca/tca_spec.json new file mode 100644 index 0000000..4d99201 --- /dev/null +++ b/dcae-analytics/dpo/tca/tca_spec.json @@ -0,0 +1,269 @@ +{ + "self": { + "name": "docker.tca", + "version": "1.0.5", + "description": "TCA Docker Application", + "component_type": "docker" + }, + "streams": { + "subscribes": [ + { + "config_key": "tca_handle_in", + "format": "VES_specification", + "version": "5.28.4", + "type": "message router" + } + ], + "publishes": [ + { + "config_key": "tca_handle_out", + "format": "TCA Alert Definition", + "version": "1.0.0", + "type": "message router" + } + ] + }, + "services": { + "calls": [ + { + "config_key": "aai_broker_handle", + "verb": "GET", + "request": { + "format": "get_with_query_params", + "version": "1.0.0" + }, + "response": { + "format": "aai_broker_response", + "version": "3.0.0" + } + } + ], + "provides": [] + }, + "auxilary": { + "healthcheck": { + "type": "http", + "interval": "30s", + "timeout": "10s", + "endpoint": "actuator/health" + } + }, + "artifacts": [ + { + "uri": "docker_repository.com:5100/org.onap.dcae.analytics/dcae-analytics-web:1.0", + "type": "docker image" + } + ], + "parameters": [ + { + "name": "spring.mongodb.uri", + "value": "mongodb://localhost:27017/analytics-tca", + "description": "Mongodb database uri", + "designer_editable": true, + "sourced_at_deployment": true, + "policy_editable": false, + "type": "string", + "required": true + }, + { + "name": "tca.policy", + "value": "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"Mfvs_eNodeB_RANKPI\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vFirewall;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":4000,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":20000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"closedLoopEventStatus\":\"ABATED\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"CRITICAL\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vLoadBalancer;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":500,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":5000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"}]},{\"eventName\":\"virtualVMEventName\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"resource=virtualVM;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":500,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"}]}]}", + "description": "Threshold Crossing Alert Policy JSON as string", + "designer_editable": false, + "sourced_at_deployment": false, + "policy_editable": true, + "type": "string", + "required": true + }, + { + "name": "tca.processing_batch_size", + "value": 10000, + "description": "Batch size for TCA Application Transaction", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "number", + "required": false + }, + { + "name": "tca.enable_abatement", + "value": true, + "description": "Enables / Disables TCA Alerts Abatement", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "boolean", + "required": false + }, + { + "name": "tca.enable_ecomp_logging", + "value": true, + "description": "Enables / Disables ECOMP Logging", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "boolean", + "required": false + }, + { + "name": "tca.aai.enable_enrichment", + "value": false, + "description": "Enables / Disables TCA A&AI Enrichment", + "designer_editable": true, + "sourced_at_deployment": true, + "policy_editable": false, + "type": "boolean", + "required": false + }, + { + "name": "tca.aai.url", + "value": "http://localhost:8443", + "description": "A&AI Enrichment Service URL. Required only if A&AI Enrichment is enabled", + "designer_editable": true, + "sourced_at_deployment": true, + "policy_editable": false, + "type": "string", + "required": false + }, + { + "name": "tca.aai.username", + "value": "DCAE", + "description": "A&AI Enrichment Service basic authentication user name", + "designer_editable": true, + "sourced_at_deployment": true, + "policy_editable": false, + "type": "string", + "required": false + }, + { + "name": "tca.aai.password", + "value": "DCAE", + "description": "A&AI Enrichment Service basic authentication user password", + "designer_editable": true, + "sourced_at_deployment": true, + "policy_editable": false, + "type": "string", + "required": false + }, + { + "name": "tca.aai.generic_vnf_path", + "value": "aai/v11/network/generic-vnfs/generic-vnf", + "description": "A&AI Enrichment Service VNF query endpoint path", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "string", + "required": false + }, + { + "name": "tca.aai.node_query_path", + "value": "aai/v11/search/nodes-query", + "description": "A&AI Enrichment Service Node query endpoint path", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "string", + "required": false + }, + { + "name": "streams_subscribes.tca_handle_in.consumer_group", + "value": "cg1", + "description": "Subscriber consumer group", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "string", + "required": false + }, + { + "name": "streams_subscribes.tca_handle_in.consumer_ids[0]", + "value": "c0", + "description": "Subscriber first consumer id", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "string", + "required": false + }, + { + "name": "streams_subscribes.tca_handle_in.consumer_ids[1]", + "value": "c1", + "description": "Subscriber second consumer id", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "string", + "required": false + }, + { + "name": "streams_subscribes.tca_handle_in.message_limit", + "value": 50000, + "description": "Maximum message fetched by TCA Subscriber", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "number", + "required": true + }, + { + "name": "streams_subscribes.tca_handle_in.timeout", + "value": -1, + "description": "Timeout for TCA Subscriber", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "number", + "required": false + }, + { + "name": "streams_subscribes.tca_handle_in.polling.fixedRate", + "value": 0, + "description": "Subscriber fixed polling interval in milliseconds. Value of 0 indicated auto adjusting polling will be used", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "number", + "required": false + }, + { + "name": "streams_subscribes.tca_handle_in.polling.auto_adjusting.min", + "value": 30000, + "description": "Subscriber Auto Adjusting polling minimum interval in milliseconds", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "number", + "required": false + }, + { + "name": "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up", + "value": 10000, + "description": "Subscriber Auto Adjusting polling step up delta in milliseconds when message is not found", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "number", + "required": false + }, + { + "name": "streams_subscribes.tca_handle_in.polling.auto_adjusting.max", + "value": 60000, + "description": "Subscriber Auto Adjusting polling maximum interval in milliseconds", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "number", + "required": false + }, + { + "name": "streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down", + "value": 30000, + "description": "Subscriber Auto Adjusting polling step down delta in milliseconds when message is found", + "designer_editable": true, + "sourced_at_deployment": false, + "policy_editable": false, + "type": "number", + "required": false + } + ] +} -- cgit 1.2.3-korg