diff options
16 files changed, 5141 insertions, 4075 deletions
diff --git a/dpo/spec/vescollector-componentspec.json b/dpo/spec/vescollector-componentspec.json index c17948b3..fd99086a 100755 --- a/dpo/spec/vescollector-componentspec.json +++ b/dpo/spec/vescollector-componentspec.json @@ -1,286 +1,283 @@ { - "self": { - "version": "1.2.0", + "self": { + "version": "1.2.0", "name": "dcae-ves-collector", - "description": "Collector for receiving VES events through restful interface", - "component_type": "docker" - }, - "streams": { - "subscribes": [ - - ], - "publishes": [ - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_fault" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_measurement" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_syslog" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_heartbeat" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_other" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_mobileflow" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_statechange" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_thresholdCrossingAlert" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_voicequality" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_sipsignaling" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_fault_secondary" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_measurement_secondary" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_syslog_secondary" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_heartbeat_secondary" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_other_secondary" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_mobileflow_secondary" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_statechange_secondary" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_thresholdCrossingAlert_secondary" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_voicequality_secondary" - }, - { - "format": "VES_specification", - "version": "5.28.4", - "type": "message router", - "config_key": "ves_sipsignaling_secondary" - } - ] - }, - "services": { - "calls": [], - "provides": [ - { - "route": "/eventListener/v1", - "verb": "POST", - "request": { - "format": "VES_specification", - "version": "4.27.2" - }, - "response": { - "format": "ves.coll.response", - "version": "1.0.0" - } - }, - { - "route": "/eventListener/v2", - "verb": "POST", - "request": { - "format": "VES_specification", - "version": "4.27.2" - }, - "response": { - "format": "ves.coll.response", - "version": "1.0.0" - } - }, - { - "route": "/eventListener/v3", - "verb": "POST", - "request": { - "format": "VES_specification", - "version": "4.27.2" - }, - "response": { - "format": "ves.coll.response", - "version": "1.0.0" - } - }, - { - "route": "/eventListener/v4", - "verb": "POST", - "request": { - "format": "VES_specification", - "version": "4.27.2" - }, - "response": { - "format": "ves.coll.response", - "version": "1.0.0" - } - }, - { - "route": "/eventListener/v5", - "verb": "POST", - "request": { - "format": "VES_specification", - "version": "5.28.4" - }, - "response": { - "format": "ves.coll.response", - "version": "1.0.0" - } - } - - ] - }, - "parameters": [ - { - "name": "collector.service.port", - "value": -1, - "description": "standard http port" - }, - { - "name": "collector.service.secure.port", - "value": 8443, - "description": "secure port " - }, - { - "name": "collector.keystore.file.location", - "value": "/opt/app/dcae-certificate/keystore.jks", - "description": "fs location of keystore in vm" - }, - { - "name": "collector.keystore.passwordfile", - "value": "/opt/app/dcae-certificate/.password", - "description": "location of keystore password file in vm" - }, - { - "name": "collector.keystore.alias", - "value": "dynamically generated", - "description": "alias to access the keystore" - }, - { - "name": "collector.inputQueue.maxPending", - "value": 8096, - "description": "Maximum queue limit before publish" - }, - { - "name": "collector.dmaap.streamid", - "value": "fault=ves_fault,ves_fault_secondary|syslog=ves_syslog,ves_syslog_secondary|heartbeat=ves_heartbeat,ves_heartbeat_secondary|measurementsForVfScaling=ves_measurement,ves_measurement_secondary|mobileFlow=ves_mobileflow,ves_mobileflow_secondary|other=ves_other,ves_other_secondary|stateChange=ves_statechange,ves_statechange_secondary|thresholdCrossingAlert=ves_thresholdCrossingAlert,ves_thresholdCrossingAlert_secondary|voiceQuality=ves_voicequality,ves_voicequality_secondary|sipSignaling=ves_sipsignaling,ves_sipsignaling_secondary", - "description": "domain-streamid mapping" - }, - { - "name": "header.authflag", - "value": 1, - "description": "Basic Authentication flag" - }, - { - "name": "header.authlist", - "value": "userid1,base64encodepwd1|userid2,base64encodepwd2", - "description": "List of id and base64 encoded pwd" - }, - { - "name": "collector.schema.checkflag", - "value": 1, - "description": "Schema check validation flag" - }, - { - "name": "collector.schema.file", - "value": "{\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.json\"}", - "description": "validation schema file name per version" - }, - { - "name": "event.transform.flag", - "value": 1, - "description": "flag to enable tranformation rules defined under eventTransform.json" - }, - { - "name": "tomcat.maxthreads", - "value": "200", - "description": "Tomcat control for concurrent request" - } - ], - "auxilary": { - "healthcheck": { - "type": "http", - "interval": "15s", - "timeout": "1s", - "endpoint": "/healthcheck" - }, - "ports": [ - "8443:8443" - ] - }, - "artifacts": [ - { - "type": "docker image", + "description": "Collector for receiving VES events through restful interface", + "component_type": "docker" + }, + "streams": { + "subscribes": [], + "publishes": [ + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_fault" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_measurement" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_syslog" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_heartbeat" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_other" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_mobileflow" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_statechange" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_thresholdCrossingAlert" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_voicequality" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_sipsignaling" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_fault_secondary" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_measurement_secondary" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_syslog_secondary" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_heartbeat_secondary" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_other_secondary" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_mobileflow_secondary" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_statechange_secondary" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_thresholdCrossingAlert_secondary" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_voicequality_secondary" + }, + { + "format": "VES_specification", + "version": "5.28.4", + "type": "message router", + "config_key": "ves_sipsignaling_secondary" + } + ] + }, + "services": { + "calls": [], + "provides": [ + { + "route": "/eventListener/v1", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v2", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v3", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v4", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v5", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "5.28.4" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + } + ] + }, + "parameters": [ + { + "name": "collector.service.port", + "value": -1, + "description": "standard http port" + }, + { + "name": "collector.service.secure.port", + "value": 8443, + "description": "secure port " + }, + { + "name": "collector.keystore.file.location", + "value": "/opt/app/dcae-certificate/keystore.jks", + "description": "fs location of keystore in vm" + }, + { + "name": "collector.keystore.passwordfile", + "value": "/opt/app/dcae-certificate/.password", + "description": "location of keystore password file in vm" + }, + { + "name": "collector.keystore.alias", + "value": "dynamically generated", + "description": "alias to access the keystore" + }, + { + "name": "collector.inputQueue.maxPending", + "value": 8096, + "description": "Maximum queue limit before publish" + }, + { + "name": "collector.dmaap.streamid", + "value": "fault=ves_fault,ves_fault_secondary|syslog=ves_syslog,ves_syslog_secondary|heartbeat=ves_heartbeat,ves_heartbeat_secondary|measurementsForVfScaling=ves_measurement,ves_measurement_secondary|mobileFlow=ves_mobileflow,ves_mobileflow_secondary|other=ves_other,ves_other_secondary|stateChange=ves_statechange,ves_statechange_secondary|thresholdCrossingAlert=ves_thresholdCrossingAlert,ves_thresholdCrossingAlert_secondary|voiceQuality=ves_voicequality,ves_voicequality_secondary|sipSignaling=ves_sipsignaling,ves_sipsignaling_secondary", + "description": "domain-streamid mapping" + }, + { + "name": "header.authflag", + "value": 1, + "description": "Basic Authentication flag" + }, + { + "name": "header.authlist", + "value": "userid1,base64encodepwd1|userid2,base64encodepwd2", + "description": "List of id and base64 encoded pwd" + }, + { + "name": "collector.schema.checkflag", + "value": 1, + "description": "Schema check validation flag" + }, + { + "name": "collector.schema.file", + "value": "{\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.json\"}", + "description": "validation schema file name per version" + }, + { + "name": "event.transform.flag", + "value": 1, + "description": "flag to enable tranformation rules defined under eventTransform.json" + }, + { + "name": "tomcat.maxthreads", + "value": "200", + "description": "Tomcat control for concurrent request" + } + ], + "auxilary": { + "healthcheck": { + "type": "http", + "interval": "15s", + "timeout": "1s", + "endpoint": "/healthcheck" + }, + "ports": [ + "8443:8443" + ] + }, + "artifacts": [ + { + "type": "docker image", "uri": "nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.1" - } - ] + } + ] } diff --git a/etc/CommonEventFormat_27.2.json b/etc/CommonEventFormat_27.2.json index 4dcfeb60..0d3faee5 100755 --- a/etc/CommonEventFormat_27.2.json +++ b/etc/CommonEventFormat_27.2.json @@ -10,8 +10,8 @@ "type": "string"
},
"licenseLink": {
- "description": "http://www.apache.org/licenses/LICENSE-2.0",
- "type":"string"
+ "description": "http://www.apache.org/licenses/LICENSE-2.0",
+ "type": "string"
},
"condition1": {
"description": "Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an AS IS BASIS,",
@@ -1382,6 +1382,6 @@ },
"eventList": {
"$ref": "#/definitions/eventList"
- }
+ }
}
}
\ No newline at end of file diff --git a/etc/CommonEventFormat_28.3.json b/etc/CommonEventFormat_28.3.json index 90f6d81a..82d5c978 100644 --- a/etc/CommonEventFormat_28.3.json +++ b/etc/CommonEventFormat_28.3.json @@ -1,8 +1,7 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - + "$schema": "http://json-schema.org/draft-04/schema#", "definitions": { - "attCopyrightNotice": { + "attCopyrightNotice": { "description": "Copyright (c) <2017>, AT&T Intellectual Property. All rights reserved. Licensed under the Apache License, Version 2.0 (the License)", "type": "object", "properties": { @@ -11,8 +10,8 @@ "type": "string" }, "licenseLink": { - "description": "http://www.apache.org/licenses/LICENSE-2.0", - "type":"string" + "description": "http://www.apache.org/licenses/LICENSE-2.0", + "type": "string" }, "condition1": { "description": "Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an AS IS BASIS,", @@ -36,17 +35,23 @@ } } }, - - "codecsInUse": { + "codecsInUse": { "description": "number of times an identified codec was used over the measurementInterval", "type": "object", "properties": { - "codecIdentifier": { "type": "string" }, - "numberInUse": { "type": "integer" } + "codecIdentifier": { + "type": "string" + }, + "numberInUse": { + "type": "integer" + } }, - "required": [ "codecIdentifier", "numberInUse" ] + "required": [ + "codecIdentifier", + "numberInUse" + ] }, - "command": { + "command": { "description": "command from an event collector toward an event source", "type": "object", "properties": { @@ -59,17 +64,25 @@ "throttlingSpecification" ] }, - "eventDomainThrottleSpecification": { "$ref": "#/definitions/eventDomainThrottleSpecification" }, - "heartbeatInterval": { "type": "integer" }, - "measurementInterval": { "type": "integer" } + "eventDomainThrottleSpecification": { + "$ref": "#/definitions/eventDomainThrottleSpecification" + }, + "heartbeatInterval": { + "type": "integer" + }, + "measurementInterval": { + "type": "integer" + } }, - "required": [ "commandType" ] + "required": [ + "commandType" + ] }, "commandList": { "description": "array of commands from an event collector toward an event source", "type": "array", "items": { - "$ref": "#/definitions/command" + "$ref": "#/definitions/command" }, "minItems": 0 }, @@ -105,7 +118,9 @@ "description": "for example - applicationVnf, guestOS, hostOS, platform", "type": "string" }, - "internalHeaderFields": { "$ref": "#/definitions/internalHeaderFields" }, + "internalHeaderFields": { + "$ref": "#/definitions/internalHeaderFields" + }, "lastEpochMicrosec": { "description": "the latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds", "type": "number" @@ -157,379 +172,442 @@ "type": "number" } }, - "required": [ "domain", "eventId", "eventName", "lastEpochMicrosec", - "priority", "reportingEntityName", "sequence", "sourceName", - "startEpochMicrosec", "version" ] + "required": [ + "domain", + "eventId", + "eventName", + "lastEpochMicrosec", + "priority", + "reportingEntityName", + "sequence", + "sourceName", + "startEpochMicrosec", + "version" + ] }, "counter": { "description": "performance counter", "type": "object", "properties": { - "criticality": { "type": "string", "enum": [ "CRIT", "MAJ" ] }, - "name": { "type": "string" }, - "thresholdCrossed": { "type": "string" }, - "value": { "type": "string"} + "criticality": { + "type": "string", + "enum": [ + "CRIT", + "MAJ" + ] + }, + "name": { + "type": "string" + }, + "thresholdCrossed": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "required": [ "criticality", "name", "thresholdCrossed", "value" ] + "required": [ + "criticality", + "name", + "thresholdCrossed", + "value" + ] }, "cpuUsage": { "description": "usage of an identified CPU", "type": "object", "properties": { - "cpuIdentifier": { - "description": "cpu identifer", - "type": "string" - }, - "cpuIdle": { - "description": "percentage of CPU time spent in the idle task", - "type": "number" - }, - "cpuUsageInterrupt": { - "description": "percentage of time spent servicing interrupts", - "type": "number" - }, - "cpuUsageNice": { - "description": "percentage of time spent running user space processes that have been niced", - "type": "number" - }, - "cpuUsageSoftIrq": { - "description": "percentage of time spent handling soft irq interrupts", - "type": "number" - }, - "cpuUsageSteal": { - "description": "percentage of time spent in involuntary wait which is neither user, system or idle time and is effectively time that went missing", - "type": "number" - }, - "cpuUsageSystem": { - "description": "percentage of time spent on system tasks running the kernel", - "type": "number" - }, - "cpuUsageUser": { - "description": "percentage of time spent running un-niced user space processes", - "type": "number" - }, - "cpuWait": { - "description": "percentage of CPU time spent waiting for I/O operations to complete", - "type": "number" - }, - "percentUsage": { - "description": "aggregate cpu usage of the virtual machine on which the VNFC reporting the event is running", - "type": "number" - } + "cpuIdentifier": { + "description": "cpu identifer", + "type": "string" + }, + "cpuIdle": { + "description": "percentage of CPU time spent in the idle task", + "type": "number" + }, + "cpuUsageInterrupt": { + "description": "percentage of time spent servicing interrupts", + "type": "number" + }, + "cpuUsageNice": { + "description": "percentage of time spent running user space processes that have been niced", + "type": "number" + }, + "cpuUsageSoftIrq": { + "description": "percentage of time spent handling soft irq interrupts", + "type": "number" + }, + "cpuUsageSteal": { + "description": "percentage of time spent in involuntary wait which is neither user, system or idle time and is effectively time that went missing", + "type": "number" + }, + "cpuUsageSystem": { + "description": "percentage of time spent on system tasks running the kernel", + "type": "number" + }, + "cpuUsageUser": { + "description": "percentage of time spent running un-niced user space processes", + "type": "number" + }, + "cpuWait": { + "description": "percentage of CPU time spent waiting for I/O operations to complete", + "type": "number" + }, + "percentUsage": { + "description": "aggregate cpu usage of the virtual machine on which the VNFC reporting the event is running", + "type": "number" + } }, - "required": [ "cpuIdentifier", "percentUsage" ] + "required": [ + "cpuIdentifier", + "percentUsage" + ] }, "diskUsage": { "description": "usage of an identified disk", "type": "object", "properties": { - "diskIdentifier": { - "description": "disk identifier", - "type": "string" - }, - "diskIoTimeAvg": { - "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the average over the measurement interval", - "type": "number" - }, - "diskIoTimeLast": { - "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the last value measurement within the measurement interval", - "type": "number" - }, - "diskIoTimeMax": { - "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the maximum value measurement within the measurement interval", - "type": "number" - }, - "diskIoTimeMin": { - "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the minimum value measurement within the measurement interval", - "type": "number" - }, - "diskMergedReadAvg": { - "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskMergedReadLast": { - "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the last value measurement within the measurement interval", - "type": "number" - }, - "diskMergedReadMax": { - "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the maximum value measurement within the measurement interval", - "type": "number" - }, - "diskMergedReadMin": { - "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the minimum value measurement within the measurement interval", - "type": "number" - }, - "diskMergedWriteAvg": { - "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskMergedWriteLast": { - "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the last value measurement within the measurement interval", - "type": "number" - }, - "diskMergedWriteMax": { - "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the maximum value measurement within the measurement interval", - "type": "number" - }, - "diskMergedWriteMin": { - "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the minimum value measurement within the measurement interval", - "type": "number" - }, - "diskOctetsReadAvg": { - "description": "number of octets per second read from a disk or partition; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskOctetsReadLast": { - "description": "number of octets per second read from a disk or partition; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskOctetsReadMax": { - "description": "number of octets per second read from a disk or partition; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskOctetsReadMin": { - "description": "number of octets per second read from a disk or partition; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskOctetsWriteAvg": { - "description": "number of octets per second written to a disk or partition; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskOctetsWriteLast": { - "description": "number of octets per second written to a disk or partition; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskOctetsWriteMax": { - "description": "number of octets per second written to a disk or partition; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskOctetsWriteMin": { - "description": "number of octets per second written to a disk or partition; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskOpsReadAvg": { - "description": "number of read operations per second issued to the disk; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskOpsReadLast": { - "description": "number of read operations per second issued to the disk; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskOpsReadMax": { - "description": "number of read operations per second issued to the disk; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskOpsReadMin": { - "description": "number of read operations per second issued to the disk; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskOpsWriteAvg": { - "description": "number of write operations per second issued to the disk; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskOpsWriteLast": { - "description": "number of write operations per second issued to the disk; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskOpsWriteMax": { - "description": "number of write operations per second issued to the disk; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskOpsWriteMin": { - "description": "number of write operations per second issued to the disk; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskPendingOperationsAvg": { - "description": "queue size of pending I/O operations per second; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskPendingOperationsLast": { - "description": "queue size of pending I/O operations per second; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskPendingOperationsMax": { - "description": "queue size of pending I/O operations per second; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskPendingOperationsMin": { - "description": "queue size of pending I/O operations per second; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskTimeReadAvg": { - "description": "milliseconds a read operation took to complete; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskTimeReadLast": { - "description": "milliseconds a read operation took to complete; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskTimeReadMax": { - "description": "milliseconds a read operation took to complete; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskTimeReadMin": { - "description": "milliseconds a read operation took to complete; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskTimeWriteAvg": { - "description": "milliseconds a write operation took to complete; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskTimeWriteLast": { - "description": "milliseconds a write operation took to complete; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskTimeWriteMax": { - "description": "milliseconds a write operation took to complete; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskTimeWriteMin": { - "description": "milliseconds a write operation took to complete; provide the minimum measurement within the measurement interval", - "type": "number" - } + "diskIdentifier": { + "description": "disk identifier", + "type": "string" + }, + "diskIoTimeAvg": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the average over the measurement interval", + "type": "number" + }, + "diskIoTimeLast": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the last value measurement within the measurement interval", + "type": "number" + }, + "diskIoTimeMax": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the maximum value measurement within the measurement interval", + "type": "number" + }, + "diskIoTimeMin": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the minimum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadAvg": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadLast": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the last value measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadMax": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the maximum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadMin": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the minimum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteAvg": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteLast": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the last value measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteMax": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the maximum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteMin": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the minimum value measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadAvg": { + "description": "number of octets per second read from a disk or partition; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadLast": { + "description": "number of octets per second read from a disk or partition; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadMax": { + "description": "number of octets per second read from a disk or partition; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadMin": { + "description": "number of octets per second read from a disk or partition; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteAvg": { + "description": "number of octets per second written to a disk or partition; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteLast": { + "description": "number of octets per second written to a disk or partition; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteMax": { + "description": "number of octets per second written to a disk or partition; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteMin": { + "description": "number of octets per second written to a disk or partition; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadAvg": { + "description": "number of read operations per second issued to the disk; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadLast": { + "description": "number of read operations per second issued to the disk; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadMax": { + "description": "number of read operations per second issued to the disk; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadMin": { + "description": "number of read operations per second issued to the disk; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteAvg": { + "description": "number of write operations per second issued to the disk; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteLast": { + "description": "number of write operations per second issued to the disk; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteMax": { + "description": "number of write operations per second issued to the disk; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteMin": { + "description": "number of write operations per second issued to the disk; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsAvg": { + "description": "queue size of pending I/O operations per second; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsLast": { + "description": "queue size of pending I/O operations per second; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsMax": { + "description": "queue size of pending I/O operations per second; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsMin": { + "description": "queue size of pending I/O operations per second; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadAvg": { + "description": "milliseconds a read operation took to complete; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadLast": { + "description": "milliseconds a read operation took to complete; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadMax": { + "description": "milliseconds a read operation took to complete; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadMin": { + "description": "milliseconds a read operation took to complete; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteAvg": { + "description": "milliseconds a write operation took to complete; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteLast": { + "description": "milliseconds a write operation took to complete; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteMax": { + "description": "milliseconds a write operation took to complete; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteMin": { + "description": "milliseconds a write operation took to complete; provide the minimum measurement within the measurement interval", + "type": "number" + } + }, + "required": [ + "diskIdentifier" + ] + }, + "endOfCallVqmSummaries": { + "description": "provides end of call voice quality metrics", + "type": "object", + "properties": { + "adjacencyName": { + "description": " adjacency name", + "type": "string" + }, + "endpointDescription": { + "description": "Either Caller or Callee", + "type": "string", + "enum": [ + "Caller", + "Callee" + ] + }, + "endpointJitter": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsDiscarded": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsReceived": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsSent": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsDiscarded": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsReceived": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsSent": { + "description": "", + "type": "number" + }, + "localJitter": { + "description": "", + "type": "number" + }, + "localRtpOctetsDiscarded": { + "description": "", + "type": "number" + }, + "localRtpOctetsReceived": { + "description": "", + "type": "number" + }, + "localRtpOctetsSent": { + "description": "", + "type": "number" + }, + "localRtpPacketsDiscarded": { + "description": "", + "type": "number" + }, + "localRtpPacketsReceived": { + "description": "", + "type": "number" + }, + "localRtpPacketsSent": { + "description": "", + "type": "number" + }, + "mosCqe": { + "description": "1-5 1dp", + "type": "number" + }, + "packetsLost": { + "description": "", + "type": "number" + }, + "packetLossPercent": { + "description": "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)", + "type": "number" + }, + "rFactor": { + "description": "0-100", + "type": "number" + }, + "roundTripDelay": { + "description": "millisecs", + "type": "number" + } }, - "required": [ "diskIdentifier" ] + "required": [ + "adjacencyName", + "endpointDescription" + ] }, - "endOfCallVqmSummaries": { - "description": "provides end of call voice quality metrics", + "event": { + "description": "the root level of the common event format", "type": "object", "properties": { - "adjacencyName": { - "description": " adjacency name", - "type": "string" - }, - "endpointDescription": { - "description": "Either Caller or Callee", - "type": "string", - "enum": ["Caller", "Callee"] - }, - "endpointJitter": { - "description": "", - "type": "number" - }, - "endpointRtpOctetsDiscarded": { - "description": "", - "type": "number" - }, - "endpointRtpOctetsReceived": { - "description": "", - "type": "number" - }, - "endpointRtpOctetsSent": { - "description": "", - "type": "number" - }, - "endpointRtpPacketsDiscarded": { - "description": "", - "type": "number" - }, - "endpointRtpPacketsReceived": { - "description": "", - "type": "number" - }, - "endpointRtpPacketsSent": { - "description": "", - "type": "number" - }, - "localJitter": { - "description": "", - "type": "number" - }, - "localRtpOctetsDiscarded": { - "description": "", - "type": "number" - }, - "localRtpOctetsReceived": { - "description": "", - "type": "number" - }, - "localRtpOctetsSent": { - "description": "", - "type": "number" - }, - "localRtpPacketsDiscarded": { - "description": "", - "type": "number" - }, - "localRtpPacketsReceived": { - "description": "", - "type": "number" - }, - "localRtpPacketsSent": { - "description": "", - "type": "number" - }, - "mosCqe": { - "description": "1-5 1dp", - "type": "number" - }, - "packetsLost": { - "description": "", - "type": "number" - }, - "packetLossPercent": { - "description" : "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)", - "type": "number" - }, - "rFactor": { - "description": "0-100", - "type": "number" - }, - "roundTripDelay": { - "description": "millisecs", - "type": "number" - } - }, - "required": [ "adjacencyName", "endpointDescription" ] - }, - "event": { - "description": "the root level of the common event format", - "type": "object", - "properties": { - "commonEventHeader": { "$ref": "#/definitions/commonEventHeader" }, - "faultFields": { "$ref": "#/definitions/faultFields" }, - "heartbeatFields": { "$ref": "#/definitions/heartbeatFields" }, - "measurementsForVfScalingFields": { "$ref": "#/definitions/measurementsForVfScalingFields" }, - "mobileFlowFields": { "$ref": "#/definitions/mobileFlowFields" }, - "otherFields": { "$ref": "#/definitions/otherFields" }, - "sipSignalingFields": { "$ref": "#/definitions/sipSignalingFields" }, - "stateChangeFields": { "$ref": "#/definitions/stateChangeFields" }, - "syslogFields": { "$ref": "#/definitions/syslogFields" }, - "thresholdCrossingAlertFields": { "$ref": "#/definitions/thresholdCrossingAlertFields" }, - "voiceQualityFields": { "$ref": "#/definitions/voiceQualityFields" } - }, - "required": [ "commonEventHeader" ] - }, + "commonEventHeader": { + "$ref": "#/definitions/commonEventHeader" + }, + "faultFields": { + "$ref": "#/definitions/faultFields" + }, + "heartbeatFields": { + "$ref": "#/definitions/heartbeatFields" + }, + "measurementsForVfScalingFields": { + "$ref": "#/definitions/measurementsForVfScalingFields" + }, + "mobileFlowFields": { + "$ref": "#/definitions/mobileFlowFields" + }, + "otherFields": { + "$ref": "#/definitions/otherFields" + }, + "sipSignalingFields": { + "$ref": "#/definitions/sipSignalingFields" + }, + "stateChangeFields": { + "$ref": "#/definitions/stateChangeFields" + }, + "syslogFields": { + "$ref": "#/definitions/syslogFields" + }, + "thresholdCrossingAlertFields": { + "$ref": "#/definitions/thresholdCrossingAlertFields" + }, + "voiceQualityFields": { + "$ref": "#/definitions/voiceQualityFields" + } + }, + "required": [ + "commonEventHeader" + ] + }, "eventDomainThrottleSpecification": { "description": "specification of what information to suppress within an event domain", "type": "object", "properties": { - "eventDomain": { - "description": "Event domain enum from the commonEventHeader domain field", - "type": "string" - }, - "suppressedFieldNames": { - "description": "List of optional field names in the event block that should not be sent to the Event Listener", - "type": "array", + "eventDomain": { + "description": "Event domain enum from the commonEventHeader domain field", + "type": "string" + }, + "suppressedFieldNames": { + "description": "List of optional field names in the event block that should not be sent to the Event Listener", + "type": "array", "items": { - "type": "string" + "type": "string" } - }, + }, "suppressedNvPairsList": { "description": "Optional list of specific NvPairsNames to suppress within a given Name-Value Field", - "type": "array", + "type": "array", "items": { - "$ref": "#/definitions/suppressedNvPairs" + "$ref": "#/definitions/suppressedNvPairs" } - } + } }, - "required": [ "eventDomain" ] + "required": [ + "eventDomain" + ] }, "eventDomainThrottleSpecificationList": { "description": "array of eventDomainThrottleSpecifications", "type": "array", "items": { - "$ref": "#/definitions/eventDomainThrottleSpecification" + "$ref": "#/definitions/eventDomainThrottleSpecification" }, "minItems": 0 }, @@ -544,17 +622,21 @@ "description": "reports the throttling in force at the event source", "type": "object", "properties": { - "eventThrottlingMode": { - "description": "Mode the event manager is in", - "type": "string", + "eventThrottlingMode": { + "description": "Mode the event manager is in", + "type": "string", "enum": [ "normal", "throttled" ] - }, - "eventDomainThrottleSpecificationList": { "$ref": "#/definitions/eventDomainThrottleSpecificationList" } + }, + "eventDomainThrottleSpecificationList": { + "$ref": "#/definitions/eventDomainThrottleSpecificationList" + } }, - "required": [ "eventThrottlingMode" ] + "required": [ + "eventThrottlingMode" + ] }, "faultFields": { "description": "fields specific to fault events", @@ -614,41 +696,82 @@ ] } }, - "required": [ "alarmCondition", "eventSeverity", "eventSourceType", - "faultFieldsVersion", "specificProblem", "vfStatus" ] + "required": [ + "alarmCondition", + "eventSeverity", + "eventSourceType", + "faultFieldsVersion", + "specificProblem", + "vfStatus" + ] }, "featuresInUse": { "description": "number of times an identified feature was used over the measurementInterval", "type": "object", "properties": { - "featureIdentifier": { "type": "string" }, - "featureUtilization": { "type": "integer" } + "featureIdentifier": { + "type": "string" + }, + "featureUtilization": { + "type": "integer" + } }, - "required": [ "featureIdentifier", "featureUtilization" ] + "required": [ + "featureIdentifier", + "featureUtilization" + ] }, "field": { "description": "name value pair", "type": "object", "properties": { - "name": { "type": "string" }, - "value": { "type": "string" } + "name": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "required": [ "name", "value" ] + "required": [ + "name", + "value" + ] }, "filesystemUsage": { "description": "disk usage of an identified virtual machine in gigabytes and/or gigabytes per second", "type": "object", "properties": { - "blockConfigured": { "type": "number" }, - "blockIops": { "type": "number" }, - "blockUsed": { "type": "number" }, - "ephemeralConfigured": { "type": "number" }, - "ephemeralIops": { "type": "number" }, - "ephemeralUsed": { "type": "number" }, - "filesystemName": { "type": "string" } + "blockConfigured": { + "type": "number" + }, + "blockIops": { + "type": "number" + }, + "blockUsed": { + "type": "number" + }, + "ephemeralConfigured": { + "type": "number" + }, + "ephemeralIops": { + "type": "number" + }, + "ephemeralUsed": { + "type": "number" + }, + "filesystemName": { + "type": "string" + } }, - "required": [ "blockConfigured", "blockIops", "blockUsed", "ephemeralConfigured", - "ephemeralIops", "ephemeralUsed", "filesystemName" ] + "required": [ + "blockConfigured", + "blockIops", + "blockUsed", + "ephemeralConfigured", + "ephemeralIops", + "ephemeralUsed", + "filesystemName" + ] }, "gtpPerFlowMetrics": { "description": "Mobility GTP Protocol per flow metrics", @@ -728,12 +851,16 @@ }, "ipTosCountList": { "description": "array of key: value pairs where the keys are drawn from the IP Type-of-Service identifiers which range from '0' to '255', and the values are the count of packets that had those ToS identifiers in the flow", - "type": "array", - "items": { + "type": "array", + "items": { "type": "array", "items": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, @@ -766,12 +893,16 @@ }, "mobileQciCosCountList": { "description": "array of key: value pairs where the keys are drawn from LTE QCI or UMTS class of service strings, and the values are the count of packets that had those strings in the flow", - "type": "array", - "items": { + "type": "array", + "items": { "type": "array", "items": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, @@ -864,12 +995,16 @@ }, "tcpFlagCountList": { "description": "array of key: value pairs where the keys are drawn from TCP Flags and the values are the count of packets that had that TCP Flag in the flow", - "type": "array", - "items": { + "type": "array", + "items": { "type": "array", "items": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, @@ -885,21 +1020,37 @@ "type": "number" } }, - "required": [ "avgBitErrorRate", "avgPacketDelayVariation", "avgPacketLatency", - "avgReceiveThroughput", "avgTransmitThroughput", - "flowActivationEpoch", "flowActivationMicrosec", - "flowDeactivationEpoch", "flowDeactivationMicrosec", - "flowDeactivationTime", "flowStatus", - "maxPacketDelayVariation", "numActivationFailures", - "numBitErrors", "numBytesReceived", "numBytesTransmitted", - "numDroppedPackets", "numL7BytesReceived", - "numL7BytesTransmitted", "numLostPackets", - "numOutOfOrderPackets", "numPacketErrors", - "numPacketsReceivedExclRetrans", - "numPacketsReceivedInclRetrans", - "numPacketsTransmittedInclRetrans", - "numRetries", "numTimeouts", "numTunneledL7BytesReceived", - "roundTripTime", "timeToFirstByte" + "required": [ + "avgBitErrorRate", + "avgPacketDelayVariation", + "avgPacketLatency", + "avgReceiveThroughput", + "avgTransmitThroughput", + "flowActivationEpoch", + "flowActivationMicrosec", + "flowDeactivationEpoch", + "flowDeactivationMicrosec", + "flowDeactivationTime", + "flowStatus", + "maxPacketDelayVariation", + "numActivationFailures", + "numBitErrors", + "numBytesReceived", + "numBytesTransmitted", + "numDroppedPackets", + "numL7BytesReceived", + "numL7BytesTransmitted", + "numLostPackets", + "numOutOfOrderPackets", + "numPacketErrors", + "numPacketsReceivedExclRetrans", + "numPacketsReceivedInclRetrans", + "numPacketsTransmittedInclRetrans", + "numRetries", + "numTimeouts", + "numTunneledL7BytesReceived", + "roundTripTime", + "timeToFirstByte" ] }, "heartbeatFields": { @@ -922,7 +1073,10 @@ "type": "integer" } }, - "required": [ "heartbeatFieldsVersion", "heartbeatInterval" ] + "required": [ + "heartbeatFieldsVersion", + "heartbeatInterval" + ] }, "internalHeaderFields": { "description": "enrichment fields for internal VES Event Listener service use only, not supplied by event sources", @@ -932,86 +1086,101 @@ "description": "json object schema, name and other meta-information along with one or more object instances", "type": "object", "properties": { - "objectInstances": { - "description": "one or more instances of the jsonObject", - "type": "array", - "items": { - "$ref": "#/definitions/jsonObjectInstance" - } - }, - "objectName": { - "description": "name of the JSON Object", - "type": "string" - }, - "objectSchema": { - "description": "json schema for the object", - "type": "string" - }, - "objectSchemaUrl": { - "description": "Url to the json schema for the object", - "type": "string" - }, - "nfSubscribedObjectName": { - "description": "name of the object associated with the nfSubscriptonId", - "type": "string" - }, - "nfSubscriptionId": { - "description": "identifies an openConfig telemetry subscription on a network function, which configures the network function to send complex object data associated with the jsonObject", - "type": "string" - } + "objectInstances": { + "description": "one or more instances of the jsonObject", + "type": "array", + "items": { + "$ref": "#/definitions/jsonObjectInstance" + } + }, + "objectName": { + "description": "name of the JSON Object", + "type": "string" + }, + "objectSchema": { + "description": "json schema for the object", + "type": "string" + }, + "objectSchemaUrl": { + "description": "Url to the json schema for the object", + "type": "string" + }, + "nfSubscribedObjectName": { + "description": "name of the object associated with the nfSubscriptonId", + "type": "string" + }, + "nfSubscriptionId": { + "description": "identifies an openConfig telemetry subscription on a network function, which configures the network function to send complex object data associated with the jsonObject", + "type": "string" + } }, - "required": [ "objectInstances", "objectName" ] + "required": [ + "objectInstances", + "objectName" + ] }, "jsonObjectInstance": { "description": "meta-information about an instance of a jsonObject along with the actual object instance", "type": "object", "properties": { - "objectInstance": { - "description": "an instance conforming to the jsonObject schema", - "type": "object" - }, - "objectInstanceEpochMicrosec": { - "description": "the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds", - "type": "number" - }, - "objectKeys": { - "description": "an ordered set of keys that identifies this particular instance of jsonObject", - "type": "array", - "items": { - "$ref": "#/definitions/key" - } - } + "objectInstance": { + "description": "an instance conforming to the jsonObject schema", + "type": "object" + }, + "objectInstanceEpochMicrosec": { + "description": "the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds", + "type": "number" + }, + "objectKeys": { + "description": "an ordered set of keys that identifies this particular instance of jsonObject", + "type": "array", + "items": { + "$ref": "#/definitions/key" + } + } }, - "required": [ "objectInstance" ] + "required": [ + "objectInstance" + ] }, "key": { "description": "tuple which provides the name of a key along with its value and relative order", "type": "object", "properties": { - "keyName": { - "description": "name of the key", - "type": "string" + "keyName": { + "description": "name of the key", + "type": "string" }, - "keyOrder": { - "description": "relative sequence or order of the key with respect to other keys", - "type": "integer" + "keyOrder": { + "description": "relative sequence or order of the key with respect to other keys", + "type": "integer" }, - "keyValue": { - "description": "value of the key", - "type": "string" + "keyValue": { + "description": "value of the key", + "type": "string" } }, - "required": [ "keyName" ] + "required": [ + "keyName" + ] }, "latencyBucketMeasure": { "description": "number of counts falling within a defined latency bucket", "type": "object", "properties": { - "countsInTheBucket": { "type": "number" }, - "highEndOfLatencyBucket": { "type": "number" }, - "lowEndOfLatencyBucket": { "type": "number" } + "countsInTheBucket": { + "type": "number" + }, + "highEndOfLatencyBucket": { + "type": "number" + }, + "lowEndOfLatencyBucket": { + "type": "number" + } }, - "required": [ "countsInTheBucket" ] + "required": [ + "countsInTheBucket" + ] }, "measurementsForVfScalingFields": { "description": "measurementsForVfScaling fields", @@ -1031,13 +1200,13 @@ "$ref": "#/definitions/namedArrayOfFields" } }, - "additionalObjects": { - "description": "array of JSON objects described by name, schema and other meta-information", + "additionalObjects": { + "description": "array of JSON objects described by name, schema and other meta-information", "type": "array", "items": { - "$ref": "#/definitions/jsonObject" + "$ref": "#/definitions/jsonObject" } - }, + }, "codecUsageArray": { "description": "array of codecs in use", "type": "array", @@ -1060,7 +1229,7 @@ "$ref": "#/definitions/cpuUsage" } }, - "diskUsageArray": { + "diskUsageArray": { "description": "usage of an array of disks", "type": "array", "items": { @@ -1127,46 +1296,53 @@ } } }, - "required": [ "measurementInterval", "measurementsForVfScalingVersion" ] + "required": [ + "measurementInterval", + "measurementsForVfScalingVersion" + ] }, "memoryUsage": { "description": "memory usage of an identified virtual machine", "type": "object", "properties": { - "memoryBuffered": { - "description": "kibibytes of temporary storage for raw disk blocks", - "type": "number" - }, - "memoryCached": { - "description": "kibibytes of memory used for cache", - "type": "number" - }, - "memoryConfigured": { - "description": "kibibytes of memory configured in the virtual machine on which the VNFC reporting the event is running", - "type": "number" - }, - "memoryFree": { - "description": "kibibytes of physical RAM left unused by the system", - "type": "number" - }, - "memorySlabRecl": { - "description": "the part of the slab that can be reclaimed such as caches measured in kibibytes", - "type": "number" - }, - "memorySlabUnrecl": { - "description": "the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes", - "type": "number" - }, - "memoryUsed": { - "description": "total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes", - "type": "number" - }, - "vmIdentifier": { - "description": "virtual machine identifier associated with the memory metrics", - "type": "string" - } + "memoryBuffered": { + "description": "kibibytes of temporary storage for raw disk blocks", + "type": "number" + }, + "memoryCached": { + "description": "kibibytes of memory used for cache", + "type": "number" + }, + "memoryConfigured": { + "description": "kibibytes of memory configured in the virtual machine on which the VNFC reporting the event is running", + "type": "number" + }, + "memoryFree": { + "description": "kibibytes of physical RAM left unused by the system", + "type": "number" + }, + "memorySlabRecl": { + "description": "the part of the slab that can be reclaimed such as caches measured in kibibytes", + "type": "number" + }, + "memorySlabUnrecl": { + "description": "the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes", + "type": "number" + }, + "memoryUsed": { + "description": "total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes", + "type": "number" + }, + "vmIdentifier": { + "description": "virtual machine identifier associated with the memory metrics", + "type": "string" + } }, - "required": [ "memoryFree", "memoryUsed", "vmIdentifier" ] + "required": [ + "memoryFree", + "memoryUsed", + "vmIdentifier" + ] }, "mobileFlowFields": { "description": "mobileFlow fields", @@ -1207,7 +1383,9 @@ "description": "Flow direction, indicating if the reporting node is the source of the flow or destination for the flow", "type": "string" }, - "gtpPerFlowMetrics": { "$ref": "#/definitions/gtpPerFlowMetrics" }, + "gtpPerFlowMetrics": { + "$ref": "#/definitions/gtpPerFlowMetrics" + }, "gtpProtocolType": { "description": "GTP protocol", "type": "string" @@ -1248,10 +1426,10 @@ "description": "mobile network code", "type": "string" }, - "mobileFlowFieldsVersion": { - "description": "version of the mobileFlowFields block", - "type": "number" - }, + "mobileFlowFieldsVersion": { + "description": "version of the mobileFlowFields block", + "type": "number" + }, "msisdn": { "description": "MSISDN for the subscriber UE used in this flow, as an integer, if the flow connects to a mobile device", "type": "string" @@ -1305,24 +1483,37 @@ "type": "string" } }, - "required": [ "flowDirection", "gtpPerFlowMetrics", "ipProtocolType", "ipVersion", - "mobileFlowFieldsVersion", "otherEndpointIpAddress", "otherEndpointPort", - "reportingEndpointIpAddr", "reportingEndpointPort" ] + "required": [ + "flowDirection", + "gtpPerFlowMetrics", + "ipProtocolType", + "ipVersion", + "mobileFlowFieldsVersion", + "otherEndpointIpAddress", + "otherEndpointPort", + "reportingEndpointIpAddr", + "reportingEndpointPort" + ] }, "namedArrayOfFields": { "description": "an array of name value pairs along with a name for the array", "type": "object", "properties": { - "name": { "type": "string" }, + "name": { + "type": "string" + }, "arrayOfFields": { "description": "array of name value pairs", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } } }, - "required": [ "name", "arrayOfFields" ] + "required": [ + "name", + "arrayOfFields" + ] }, "otherFields": { "description": "fields for events belonging to the 'other' domain of the commonEventHeader domain enumeration", @@ -1335,32 +1526,34 @@ "$ref": "#/definitions/namedArrayOfFields" } }, - "jsonObjects": { - "description": "array of JSON objects described by name, schema and other meta-information", + "jsonObjects": { + "description": "array of JSON objects described by name, schema and other meta-information", "type": "array", "items": { - "$ref": "#/definitions/jsonObject" + "$ref": "#/definitions/jsonObject" } - }, + }, "nameValuePairs": { "description": "array of name-value pairs", "type": "array", "items": { "$ref": "#/definitions/field" } - }, - "otherFieldsVersion": { - "description": "version of the otherFields block", - "type": "number" - } - }, - "required": [ "otherFieldsVersion" ] + }, + "otherFieldsVersion": { + "description": "version of the otherFields block", + "type": "number" + } + }, + "required": [ + "otherFieldsVersion" + ] }, "requestError": { "description": "standard request error data structure", "type": "object", "properties": { - "messageId": { + "messageId": { "description": "Unique message identifier of the format ABCnnnn where ABC is either SVC for Service Exceptions or POL for Policy Exception", "type": "string" }, @@ -1377,58 +1570,68 @@ "type": "string" } }, - "required": [ "messageId", "text" ] + "required": [ + "messageId", + "text" + ] }, - "sipSignalingFields": { - "description": "sip signaling fields", - "type": "object", - "properties": { - "additionalInformation": { + "sipSignalingFields": { + "description": "sip signaling fields", + "type": "object", + "properties": { + "additionalInformation": { "description": "additional sip signaling fields if needed", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } - }, - "compressedSip": { - "description": "the full SIP request/response including headers and bodies", - "type": "string" - }, - "correlator": { - "description": "this is the same for all events on this call", - "type": "string" - }, - "localIpAddress": { - "description": "IP address on VNF", - "type": "string" - }, - "localPort": { - "description": "port on VNF", - "type": "string" - }, - "remoteIpAddress": { - "description": "IP address of peer endpoint", - "type": "string" - }, - "remotePort": { - "description": "port of peer endpoint", - "type": "string" - }, - "sipSignalingFieldsVersion": { - "description": "version of the sipSignalingFields block", - "type": "number" - }, - "summarySip": { - "description": "the SIP Method or Response (‘INVITE’, ‘200 OK’, ‘BYE’, etc)", - "type": "string" - }, - "vendorVnfNameFields": { - "$ref": "#/definitions/vendorVnfNameFields" - } - }, - "required": [ "correlator", "localIpAddress", "localPort", "remoteIpAddress", - "remotePort", "sipSignalingFieldsVersion", "vendorVnfNameFields" ] - }, + }, + "compressedSip": { + "description": "the full SIP request/response including headers and bodies", + "type": "string" + }, + "correlator": { + "description": "this is the same for all events on this call", + "type": "string" + }, + "localIpAddress": { + "description": "IP address on VNF", + "type": "string" + }, + "localPort": { + "description": "port on VNF", + "type": "string" + }, + "remoteIpAddress": { + "description": "IP address of peer endpoint", + "type": "string" + }, + "remotePort": { + "description": "port of peer endpoint", + "type": "string" + }, + "sipSignalingFieldsVersion": { + "description": "version of the sipSignalingFields block", + "type": "number" + }, + "summarySip": { + "description": "the SIP Method or Response (‘INVITE’, ‘200 OK’, ‘BYE’, etc)", + "type": "string" + }, + "vendorVnfNameFields": { + "$ref": "#/definitions/vendorVnfNameFields" + } + }, + "required": [ + "correlator", + "localIpAddress", + "localPort", + "remoteIpAddress", + "remotePort", + "sipSignalingFieldsVersion", + "vendorVnfNameFields" + ] + }, "stateChangeFields": { "description": "stateChange fields", "type": "object", @@ -1467,7 +1670,12 @@ "type": "string" } }, - "required": [ "newState", "oldState", "stateChangeFieldsVersion", "stateInterface" ] + "required": [ + "newState", + "oldState", + "stateChangeFieldsVersion", + "stateInterface" + ] }, "suppressedNvPairs": { "description": "List of specific NvPairsNames to suppress within a given Name-Value Field for event Throttling", @@ -1479,13 +1687,16 @@ }, "suppressedNvPairNames": { "description": "Array of nvpair names to suppress within the nvpairFieldName", - "type": "array", + "type": "array", "items": { - "type": "string" + "type": "string" } } }, - "required": [ "nvPairFieldName", "suppressedNvPairNames" ] + "required": [ + "nvPairFieldName", + "suppressedNvPairNames" + ] }, "syslogFields": { "description": "sysLog fields", @@ -1558,7 +1769,12 @@ "type": "number" } }, - "required": [ "eventSourceType", "syslogFieldsVersion", "syslogMsg", "syslogTag" ] + "required": [ + "eventSourceType", + "syslogFieldsVersion", + "syslogMsg", + "syslogTag" + ] }, "thresholdCrossingAlertFields": { "description": "fields specific to threshold crossing alert events", @@ -1567,8 +1783,8 @@ "additionalFields": { "description": "additional threshold crossing alert fields if needed", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } }, "additionalParameters": { @@ -1608,7 +1824,9 @@ "associatedAlertIdList": { "description": "List of eventIds associated with the event being reported", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "collectionTimestamp": { "description": "Time when the performance collector picked up the data; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800", @@ -1682,7 +1900,9 @@ "type": "string" } }, - "required": [ "vendorName" ] + "required": [ + "vendorName" + ] }, "vNicPerformance": { "description": "describes the performance and errors of an identified virtual network interface card", @@ -1803,64 +2023,78 @@ "valuesAreSuspect": { "description": "Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other condtions", "type": "string", - "enum": [ "true", "false" ] + "enum": [ + "true", + "false" + ] }, "vNicIdentifier": { "description": "vNic identification", "type": "string" } }, - "required": [ "valuesAreSuspect", "vNicIdentifier" ] + "required": [ + "valuesAreSuspect", + "vNicIdentifier" + ] }, - "voiceQualityFields": { - "description": "provides statistics related to customer facing voice products", - "type": "object", - "properties": { - "additionalInformation": { + "voiceQualityFields": { + "description": "provides statistics related to customer facing voice products", + "type": "object", + "properties": { + "additionalInformation": { "description": "additional voice quality fields if needed", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } - }, - "calleeSideCodec": { - "description": "callee codec for the call", - "type": "string" - }, - "callerSideCodec": { - "description": "caller codec for the call", - "type": "string" - }, - "correlator": { - "description": "this is the same for all events on this call", - "type": "string" - }, - "endOfCallVqmSummaries": { - "$ref": "#/definitions/endOfCallVqmSummaries" - }, - "phoneNumber": { - "description": "phone number associated with the correlator", - "type": "string" - }, - "midCallRtcp": { - "description": "Base64 encoding of the binary RTCP data excluding Eth/IP/UDP headers", - "type": "string" - }, - "vendorVnfNameFields": { - "$ref": "#/definitions/vendorVnfNameFields" - }, - "voiceQualityFieldsVersion": { - "description": "version of the voiceQualityFields block", - "type": "number" - } - }, - "required": [ "calleeSideCodec", "callerSideCodec", "correlator", "midCallRtcp", - "vendorVnfNameFields", "voiceQualityFieldsVersion" ] - } + }, + "calleeSideCodec": { + "description": "callee codec for the call", + "type": "string" + }, + "callerSideCodec": { + "description": "caller codec for the call", + "type": "string" + }, + "correlator": { + "description": "this is the same for all events on this call", + "type": "string" + }, + "endOfCallVqmSummaries": { + "$ref": "#/definitions/endOfCallVqmSummaries" + }, + "phoneNumber": { + "description": "phone number associated with the correlator", + "type": "string" + }, + "midCallRtcp": { + "description": "Base64 encoding of the binary RTCP data excluding Eth/IP/UDP headers", + "type": "string" + }, + "vendorVnfNameFields": { + "$ref": "#/definitions/vendorVnfNameFields" + }, + "voiceQualityFieldsVersion": { + "description": "version of the voiceQualityFields block", + "type": "number" + } + }, + "required": [ + "calleeSideCodec", + "callerSideCodec", + "correlator", + "midCallRtcp", + "vendorVnfNameFields", + "voiceQualityFieldsVersion" + ] + } }, "title": "Event Listener", "type": "object", "properties": { - "event": {"$ref": "#/definitions/event"} - } + "event": { + "$ref": "#/definitions/event" + } + } } diff --git a/etc/CommonEventFormat_28.4.1.json b/etc/CommonEventFormat_28.4.1.json index 9746e4c4..7ebb6dc1 100755 --- a/etc/CommonEventFormat_28.4.1.json +++ b/etc/CommonEventFormat_28.4.1.json @@ -1,67 +1,77 @@ {
- "$schema": "http://json-schema.org/draft-04/schema#",
+ "$schema": "http://json-schema.org/draft-04/schema#",
"title": "VES Event Listener",
"type": "object",
"properties": {
- "event": {"$ref": "#/definitions/event"},
- "eventList": {"$ref": "#/definitions/eventList"}
- },
-
+ "event": {
+ "$ref": "#/definitions/event"
+ },
+ "eventList": {
+ "$ref": "#/definitions/eventList"
+ }
+ },
"definitions": {
- "schemaHeaderBlock": {
- "description": "schema date, version, author and associated API",
- "type": "object",
- "properties": {
- "associatedApi": {
- "description": "VES Event Listener",
- "type": "string"
- },
- "lastUpdatedBy": {
- "description": "re2947",
- "type": "string"
- },
- "schemaDate": {
- "description": "September 19, 2017",
- "type": "string"
- },
- "schemaVersion": {
- "description": "28.4.1",
- "type": "number"
- }
- }
- },
- "schemaLicenseAndCopyrightNotice": {
- "description": "Copyright (c) 2017, AT&T Intellectual Property. All rights reserved",
- "type": "object",
- "properties": {
- "apacheLicense2.0": {
- "description": "Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at:",
- "type": "string"
- },
- "licenseUrl": {
- "description": "http://www.apache.org/licenses/LICENSE-2.0",
- "type": "string"
- },
- "asIsClause": {
- "description": "Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
- "type": "string"
- },
- "permissionsAndLimitations": {
- "description": "See the License for the specific language governing permissions and limitations under the License.",
- "type": "string"
- }
- }
- },
- "codecsInUse": {
+ "schemaHeaderBlock": {
+ "description": "schema date, version, author and associated API",
+ "type": "object",
+ "properties": {
+ "associatedApi": {
+ "description": "VES Event Listener",
+ "type": "string"
+ },
+ "lastUpdatedBy": {
+ "description": "re2947",
+ "type": "string"
+ },
+ "schemaDate": {
+ "description": "September 19, 2017",
+ "type": "string"
+ },
+ "schemaVersion": {
+ "description": "28.4.1",
+ "type": "number"
+ }
+ }
+ },
+ "schemaLicenseAndCopyrightNotice": {
+ "description": "Copyright (c) 2017, AT&T Intellectual Property. All rights reserved",
+ "type": "object",
+ "properties": {
+ "apacheLicense2.0": {
+ "description": "Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at:",
+ "type": "string"
+ },
+ "licenseUrl": {
+ "description": "http://www.apache.org/licenses/LICENSE-2.0",
+ "type": "string"
+ },
+ "asIsClause": {
+ "description": "Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
+ "type": "string"
+ },
+ "permissionsAndLimitations": {
+ "description": "See the License for the specific language governing permissions and limitations under the License.",
+ "type": "string"
+ }
+ }
+ },
+ "codecsInUse": {
"description": "number of times an identified codec was used over the measurementInterval",
"type": "object",
"properties": {
- "codecIdentifier": { "type": "string" },
- "numberInUse": { "type": "integer" }
+ "codecIdentifier": {
+ "type": "string"
+ },
+ "numberInUse": {
+ "type": "integer"
+ }
},
- "required": [ "codecIdentifier", "numberInUse" ]
+ "required": [
+ "codecIdentifier",
+ "numberInUse"
+ ]
},
- "command": {
+ "command": {
"description": "command from an event collector toward an event source",
"type": "object",
"properties": {
@@ -74,17 +84,25 @@ "throttlingSpecification"
]
},
- "eventDomainThrottleSpecification": { "$ref": "#/definitions/eventDomainThrottleSpecification" },
- "heartbeatInterval": { "type": "integer" },
- "measurementInterval": { "type": "integer" }
+ "eventDomainThrottleSpecification": {
+ "$ref": "#/definitions/eventDomainThrottleSpecification"
+ },
+ "heartbeatInterval": {
+ "type": "integer"
+ },
+ "measurementInterval": {
+ "type": "integer"
+ }
},
- "required": [ "commandType" ]
+ "required": [
+ "commandType"
+ ]
},
"commandList": {
"description": "array of commands from an event collector toward an event source",
"type": "array",
"items": {
- "$ref": "#/definitions/command"
+ "$ref": "#/definitions/command"
},
"minItems": 0
},
@@ -120,7 +138,9 @@ "description": "for example - applicationVnf, guestOS, hostOS, platform",
"type": "string"
},
- "internalHeaderFields": { "$ref": "#/definitions/internalHeaderFields" },
+ "internalHeaderFields": {
+ "$ref": "#/definitions/internalHeaderFields"
+ },
"lastEpochMicrosec": {
"description": "the latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds",
"type": "number"
@@ -172,379 +192,442 @@ "type": "number"
}
},
- "required": [ "domain", "eventId", "eventName", "lastEpochMicrosec",
- "priority", "reportingEntityName", "sequence", "sourceName",
- "startEpochMicrosec", "version" ]
+ "required": [
+ "domain",
+ "eventId",
+ "eventName",
+ "lastEpochMicrosec",
+ "priority",
+ "reportingEntityName",
+ "sequence",
+ "sourceName",
+ "startEpochMicrosec",
+ "version"
+ ]
},
"counter": {
"description": "performance counter",
"type": "object",
"properties": {
- "criticality": { "type": "string", "enum": [ "CRIT", "MAJ" ] },
- "name": { "type": "string" },
- "thresholdCrossed": { "type": "string" },
- "value": { "type": "string"}
+ "criticality": {
+ "type": "string",
+ "enum": [
+ "CRIT",
+ "MAJ"
+ ]
+ },
+ "name": {
+ "type": "string"
+ },
+ "thresholdCrossed": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
},
- "required": [ "criticality", "name", "thresholdCrossed", "value" ]
+ "required": [
+ "criticality",
+ "name",
+ "thresholdCrossed",
+ "value"
+ ]
},
"cpuUsage": {
"description": "usage of an identified CPU",
"type": "object",
"properties": {
- "cpuIdentifier": {
- "description": "cpu identifer",
- "type": "string"
- },
- "cpuIdle": {
- "description": "percentage of CPU time spent in the idle task",
- "type": "number"
- },
- "cpuUsageInterrupt": {
- "description": "percentage of time spent servicing interrupts",
- "type": "number"
- },
- "cpuUsageNice": {
- "description": "percentage of time spent running user space processes that have been niced",
- "type": "number"
- },
- "cpuUsageSoftIrq": {
- "description": "percentage of time spent handling soft irq interrupts",
- "type": "number"
- },
- "cpuUsageSteal": {
- "description": "percentage of time spent in involuntary wait which is neither user, system or idle time and is effectively time that went missing",
- "type": "number"
- },
- "cpuUsageSystem": {
- "description": "percentage of time spent on system tasks running the kernel",
- "type": "number"
- },
- "cpuUsageUser": {
- "description": "percentage of time spent running un-niced user space processes",
- "type": "number"
- },
- "cpuWait": {
- "description": "percentage of CPU time spent waiting for I/O operations to complete",
- "type": "number"
- },
- "percentUsage": {
- "description": "aggregate cpu usage of the virtual machine on which the VNFC reporting the event is running",
- "type": "number"
- }
+ "cpuIdentifier": {
+ "description": "cpu identifer",
+ "type": "string"
+ },
+ "cpuIdle": {
+ "description": "percentage of CPU time spent in the idle task",
+ "type": "number"
+ },
+ "cpuUsageInterrupt": {
+ "description": "percentage of time spent servicing interrupts",
+ "type": "number"
+ },
+ "cpuUsageNice": {
+ "description": "percentage of time spent running user space processes that have been niced",
+ "type": "number"
+ },
+ "cpuUsageSoftIrq": {
+ "description": "percentage of time spent handling soft irq interrupts",
+ "type": "number"
+ },
+ "cpuUsageSteal": {
+ "description": "percentage of time spent in involuntary wait which is neither user, system or idle time and is effectively time that went missing",
+ "type": "number"
+ },
+ "cpuUsageSystem": {
+ "description": "percentage of time spent on system tasks running the kernel",
+ "type": "number"
+ },
+ "cpuUsageUser": {
+ "description": "percentage of time spent running un-niced user space processes",
+ "type": "number"
+ },
+ "cpuWait": {
+ "description": "percentage of CPU time spent waiting for I/O operations to complete",
+ "type": "number"
+ },
+ "percentUsage": {
+ "description": "aggregate cpu usage of the virtual machine on which the VNFC reporting the event is running",
+ "type": "number"
+ }
},
- "required": [ "cpuIdentifier", "percentUsage" ]
+ "required": [
+ "cpuIdentifier",
+ "percentUsage"
+ ]
},
"diskUsage": {
"description": "usage of an identified disk",
"type": "object",
"properties": {
- "diskIdentifier": {
- "description": "disk identifier",
- "type": "string"
- },
- "diskIoTimeAvg": {
- "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the average over the measurement interval",
- "type": "number"
- },
- "diskIoTimeLast": {
- "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the last value measurement within the measurement interval",
- "type": "number"
- },
- "diskIoTimeMax": {
- "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the maximum value measurement within the measurement interval",
- "type": "number"
- },
- "diskIoTimeMin": {
- "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the minimum value measurement within the measurement interval",
- "type": "number"
- },
- "diskMergedReadAvg": {
- "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the average measurement within the measurement interval",
- "type": "number"
- },
- "diskMergedReadLast": {
- "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the last value measurement within the measurement interval",
- "type": "number"
- },
- "diskMergedReadMax": {
- "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the maximum value measurement within the measurement interval",
- "type": "number"
- },
- "diskMergedReadMin": {
- "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the minimum value measurement within the measurement interval",
- "type": "number"
- },
- "diskMergedWriteAvg": {
- "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the average measurement within the measurement interval",
- "type": "number"
- },
- "diskMergedWriteLast": {
- "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the last value measurement within the measurement interval",
- "type": "number"
- },
- "diskMergedWriteMax": {
- "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the maximum value measurement within the measurement interval",
- "type": "number"
- },
- "diskMergedWriteMin": {
- "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the minimum value measurement within the measurement interval",
- "type": "number"
- },
- "diskOctetsReadAvg": {
- "description": "number of octets per second read from a disk or partition; provide the average measurement within the measurement interval",
- "type": "number"
- },
- "diskOctetsReadLast": {
- "description": "number of octets per second read from a disk or partition; provide the last measurement within the measurement interval",
- "type": "number"
- },
- "diskOctetsReadMax": {
- "description": "number of octets per second read from a disk or partition; provide the maximum measurement within the measurement interval",
- "type": "number"
- },
- "diskOctetsReadMin": {
- "description": "number of octets per second read from a disk or partition; provide the minimum measurement within the measurement interval",
- "type": "number"
- },
- "diskOctetsWriteAvg": {
- "description": "number of octets per second written to a disk or partition; provide the average measurement within the measurement interval",
- "type": "number"
- },
- "diskOctetsWriteLast": {
- "description": "number of octets per second written to a disk or partition; provide the last measurement within the measurement interval",
- "type": "number"
- },
- "diskOctetsWriteMax": {
- "description": "number of octets per second written to a disk or partition; provide the maximum measurement within the measurement interval",
- "type": "number"
- },
- "diskOctetsWriteMin": {
- "description": "number of octets per second written to a disk or partition; provide the minimum measurement within the measurement interval",
- "type": "number"
- },
- "diskOpsReadAvg": {
- "description": "number of read operations per second issued to the disk; provide the average measurement within the measurement interval",
- "type": "number"
- },
- "diskOpsReadLast": {
- "description": "number of read operations per second issued to the disk; provide the last measurement within the measurement interval",
- "type": "number"
- },
- "diskOpsReadMax": {
- "description": "number of read operations per second issued to the disk; provide the maximum measurement within the measurement interval",
- "type": "number"
- },
- "diskOpsReadMin": {
- "description": "number of read operations per second issued to the disk; provide the minimum measurement within the measurement interval",
- "type": "number"
- },
- "diskOpsWriteAvg": {
- "description": "number of write operations per second issued to the disk; provide the average measurement within the measurement interval",
- "type": "number"
- },
- "diskOpsWriteLast": {
- "description": "number of write operations per second issued to the disk; provide the last measurement within the measurement interval",
- "type": "number"
- },
- "diskOpsWriteMax": {
- "description": "number of write operations per second issued to the disk; provide the maximum measurement within the measurement interval",
- "type": "number"
- },
- "diskOpsWriteMin": {
- "description": "number of write operations per second issued to the disk; provide the minimum measurement within the measurement interval",
- "type": "number"
- },
- "diskPendingOperationsAvg": {
- "description": "queue size of pending I/O operations per second; provide the average measurement within the measurement interval",
- "type": "number"
- },
- "diskPendingOperationsLast": {
- "description": "queue size of pending I/O operations per second; provide the last measurement within the measurement interval",
- "type": "number"
- },
- "diskPendingOperationsMax": {
- "description": "queue size of pending I/O operations per second; provide the maximum measurement within the measurement interval",
- "type": "number"
- },
- "diskPendingOperationsMin": {
- "description": "queue size of pending I/O operations per second; provide the minimum measurement within the measurement interval",
- "type": "number"
- },
- "diskTimeReadAvg": {
- "description": "milliseconds a read operation took to complete; provide the average measurement within the measurement interval",
- "type": "number"
- },
- "diskTimeReadLast": {
- "description": "milliseconds a read operation took to complete; provide the last measurement within the measurement interval",
- "type": "number"
- },
- "diskTimeReadMax": {
- "description": "milliseconds a read operation took to complete; provide the maximum measurement within the measurement interval",
- "type": "number"
- },
- "diskTimeReadMin": {
- "description": "milliseconds a read operation took to complete; provide the minimum measurement within the measurement interval",
- "type": "number"
- },
- "diskTimeWriteAvg": {
- "description": "milliseconds a write operation took to complete; provide the average measurement within the measurement interval",
- "type": "number"
- },
- "diskTimeWriteLast": {
- "description": "milliseconds a write operation took to complete; provide the last measurement within the measurement interval",
- "type": "number"
- },
- "diskTimeWriteMax": {
- "description": "milliseconds a write operation took to complete; provide the maximum measurement within the measurement interval",
- "type": "number"
- },
- "diskTimeWriteMin": {
- "description": "milliseconds a write operation took to complete; provide the minimum measurement within the measurement interval",
- "type": "number"
- }
+ "diskIdentifier": {
+ "description": "disk identifier",
+ "type": "string"
+ },
+ "diskIoTimeAvg": {
+ "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the average over the measurement interval",
+ "type": "number"
+ },
+ "diskIoTimeLast": {
+ "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the last value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskIoTimeMax": {
+ "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the maximum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskIoTimeMin": {
+ "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the minimum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedReadAvg": {
+ "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedReadLast": {
+ "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the last value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedReadMax": {
+ "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the maximum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedReadMin": {
+ "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the minimum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedWriteAvg": {
+ "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedWriteLast": {
+ "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the last value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedWriteMax": {
+ "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the maximum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskMergedWriteMin": {
+ "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the minimum value measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsReadAvg": {
+ "description": "number of octets per second read from a disk or partition; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsReadLast": {
+ "description": "number of octets per second read from a disk or partition; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsReadMax": {
+ "description": "number of octets per second read from a disk or partition; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsReadMin": {
+ "description": "number of octets per second read from a disk or partition; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsWriteAvg": {
+ "description": "number of octets per second written to a disk or partition; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsWriteLast": {
+ "description": "number of octets per second written to a disk or partition; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsWriteMax": {
+ "description": "number of octets per second written to a disk or partition; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOctetsWriteMin": {
+ "description": "number of octets per second written to a disk or partition; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsReadAvg": {
+ "description": "number of read operations per second issued to the disk; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsReadLast": {
+ "description": "number of read operations per second issued to the disk; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsReadMax": {
+ "description": "number of read operations per second issued to the disk; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsReadMin": {
+ "description": "number of read operations per second issued to the disk; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsWriteAvg": {
+ "description": "number of write operations per second issued to the disk; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsWriteLast": {
+ "description": "number of write operations per second issued to the disk; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsWriteMax": {
+ "description": "number of write operations per second issued to the disk; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskOpsWriteMin": {
+ "description": "number of write operations per second issued to the disk; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskPendingOperationsAvg": {
+ "description": "queue size of pending I/O operations per second; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskPendingOperationsLast": {
+ "description": "queue size of pending I/O operations per second; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskPendingOperationsMax": {
+ "description": "queue size of pending I/O operations per second; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskPendingOperationsMin": {
+ "description": "queue size of pending I/O operations per second; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeReadAvg": {
+ "description": "milliseconds a read operation took to complete; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeReadLast": {
+ "description": "milliseconds a read operation took to complete; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeReadMax": {
+ "description": "milliseconds a read operation took to complete; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeReadMin": {
+ "description": "milliseconds a read operation took to complete; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeWriteAvg": {
+ "description": "milliseconds a write operation took to complete; provide the average measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeWriteLast": {
+ "description": "milliseconds a write operation took to complete; provide the last measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeWriteMax": {
+ "description": "milliseconds a write operation took to complete; provide the maximum measurement within the measurement interval",
+ "type": "number"
+ },
+ "diskTimeWriteMin": {
+ "description": "milliseconds a write operation took to complete; provide the minimum measurement within the measurement interval",
+ "type": "number"
+ }
+ },
+ "required": [
+ "diskIdentifier"
+ ]
+ },
+ "endOfCallVqmSummaries": {
+ "description": "provides end of call voice quality metrics",
+ "type": "object",
+ "properties": {
+ "adjacencyName": {
+ "description": " adjacency name",
+ "type": "string"
+ },
+ "endpointDescription": {
+ "description": "Either Caller or Callee",
+ "type": "string",
+ "enum": [
+ "Caller",
+ "Callee"
+ ]
+ },
+ "endpointJitter": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpOctetsDiscarded": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpOctetsReceived": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpOctetsSent": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpPacketsDiscarded": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpPacketsReceived": {
+ "description": "",
+ "type": "number"
+ },
+ "endpointRtpPacketsSent": {
+ "description": "",
+ "type": "number"
+ },
+ "localJitter": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpOctetsDiscarded": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpOctetsReceived": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpOctetsSent": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpPacketsDiscarded": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpPacketsReceived": {
+ "description": "",
+ "type": "number"
+ },
+ "localRtpPacketsSent": {
+ "description": "",
+ "type": "number"
+ },
+ "mosCqe": {
+ "description": "1-5 1dp",
+ "type": "number"
+ },
+ "packetsLost": {
+ "description": "",
+ "type": "number"
+ },
+ "packetLossPercent": {
+ "description": "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)",
+ "type": "number"
+ },
+ "rFactor": {
+ "description": "0-100",
+ "type": "number"
+ },
+ "roundTripDelay": {
+ "description": "millisecs",
+ "type": "number"
+ }
},
- "required": [ "diskIdentifier" ]
+ "required": [
+ "adjacencyName",
+ "endpointDescription"
+ ]
},
- "endOfCallVqmSummaries": {
- "description": "provides end of call voice quality metrics",
+ "event": {
+ "description": "the root level of the common event format",
"type": "object",
"properties": {
- "adjacencyName": {
- "description": " adjacency name",
- "type": "string"
- },
- "endpointDescription": {
- "description": "Either Caller or Callee",
- "type": "string",
- "enum": ["Caller", "Callee"]
- },
- "endpointJitter": {
- "description": "",
- "type": "number"
- },
- "endpointRtpOctetsDiscarded": {
- "description": "",
- "type": "number"
- },
- "endpointRtpOctetsReceived": {
- "description": "",
- "type": "number"
- },
- "endpointRtpOctetsSent": {
- "description": "",
- "type": "number"
- },
- "endpointRtpPacketsDiscarded": {
- "description": "",
- "type": "number"
- },
- "endpointRtpPacketsReceived": {
- "description": "",
- "type": "number"
- },
- "endpointRtpPacketsSent": {
- "description": "",
- "type": "number"
- },
- "localJitter": {
- "description": "",
- "type": "number"
- },
- "localRtpOctetsDiscarded": {
- "description": "",
- "type": "number"
- },
- "localRtpOctetsReceived": {
- "description": "",
- "type": "number"
- },
- "localRtpOctetsSent": {
- "description": "",
- "type": "number"
- },
- "localRtpPacketsDiscarded": {
- "description": "",
- "type": "number"
- },
- "localRtpPacketsReceived": {
- "description": "",
- "type": "number"
- },
- "localRtpPacketsSent": {
- "description": "",
- "type": "number"
- },
- "mosCqe": {
- "description": "1-5 1dp",
- "type": "number"
- },
- "packetsLost": {
- "description": "",
- "type": "number"
- },
- "packetLossPercent": {
- "description" : "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)",
- "type": "number"
- },
- "rFactor": {
- "description": "0-100",
- "type": "number"
- },
- "roundTripDelay": {
- "description": "millisecs",
- "type": "number"
- }
- },
- "required": [ "adjacencyName", "endpointDescription" ]
- },
- "event": {
- "description": "the root level of the common event format",
- "type": "object",
- "properties": {
- "commonEventHeader": { "$ref": "#/definitions/commonEventHeader" },
- "faultFields": { "$ref": "#/definitions/faultFields" },
- "heartbeatFields": { "$ref": "#/definitions/heartbeatFields" },
- "measurementsForVfScalingFields": { "$ref": "#/definitions/measurementsForVfScalingFields" },
- "mobileFlowFields": { "$ref": "#/definitions/mobileFlowFields" },
- "otherFields": { "$ref": "#/definitions/otherFields" },
- "sipSignalingFields": { "$ref": "#/definitions/sipSignalingFields" },
- "stateChangeFields": { "$ref": "#/definitions/stateChangeFields" },
- "syslogFields": { "$ref": "#/definitions/syslogFields" },
- "thresholdCrossingAlertFields": { "$ref": "#/definitions/thresholdCrossingAlertFields" },
- "voiceQualityFields": { "$ref": "#/definitions/voiceQualityFields" }
- },
- "required": [ "commonEventHeader" ]
- },
+ "commonEventHeader": {
+ "$ref": "#/definitions/commonEventHeader"
+ },
+ "faultFields": {
+ "$ref": "#/definitions/faultFields"
+ },
+ "heartbeatFields": {
+ "$ref": "#/definitions/heartbeatFields"
+ },
+ "measurementsForVfScalingFields": {
+ "$ref": "#/definitions/measurementsForVfScalingFields"
+ },
+ "mobileFlowFields": {
+ "$ref": "#/definitions/mobileFlowFields"
+ },
+ "otherFields": {
+ "$ref": "#/definitions/otherFields"
+ },
+ "sipSignalingFields": {
+ "$ref": "#/definitions/sipSignalingFields"
+ },
+ "stateChangeFields": {
+ "$ref": "#/definitions/stateChangeFields"
+ },
+ "syslogFields": {
+ "$ref": "#/definitions/syslogFields"
+ },
+ "thresholdCrossingAlertFields": {
+ "$ref": "#/definitions/thresholdCrossingAlertFields"
+ },
+ "voiceQualityFields": {
+ "$ref": "#/definitions/voiceQualityFields"
+ }
+ },
+ "required": [
+ "commonEventHeader"
+ ]
+ },
"eventDomainThrottleSpecification": {
"description": "specification of what information to suppress within an event domain",
"type": "object",
"properties": {
- "eventDomain": {
- "description": "Event domain enum from the commonEventHeader domain field",
- "type": "string"
- },
- "suppressedFieldNames": {
- "description": "List of optional field names in the event block that should not be sent to the Event Listener",
- "type": "array",
+ "eventDomain": {
+ "description": "Event domain enum from the commonEventHeader domain field",
+ "type": "string"
+ },
+ "suppressedFieldNames": {
+ "description": "List of optional field names in the event block that should not be sent to the Event Listener",
+ "type": "array",
"items": {
- "type": "string"
+ "type": "string"
}
- },
+ },
"suppressedNvPairsList": {
"description": "Optional list of specific NvPairsNames to suppress within a given Name-Value Field",
- "type": "array",
+ "type": "array",
"items": {
- "$ref": "#/definitions/suppressedNvPairs"
+ "$ref": "#/definitions/suppressedNvPairs"
}
- }
+ }
},
- "required": [ "eventDomain" ]
+ "required": [
+ "eventDomain"
+ ]
},
"eventDomainThrottleSpecificationList": {
"description": "array of eventDomainThrottleSpecifications",
"type": "array",
"items": {
- "$ref": "#/definitions/eventDomainThrottleSpecification"
+ "$ref": "#/definitions/eventDomainThrottleSpecification"
},
"minItems": 0
},
@@ -559,17 +642,21 @@ "description": "reports the throttling in force at the event source",
"type": "object",
"properties": {
- "eventThrottlingMode": {
- "description": "Mode the event manager is in",
- "type": "string",
+ "eventThrottlingMode": {
+ "description": "Mode the event manager is in",
+ "type": "string",
"enum": [
"normal",
"throttled"
]
- },
- "eventDomainThrottleSpecificationList": { "$ref": "#/definitions/eventDomainThrottleSpecificationList" }
+ },
+ "eventDomainThrottleSpecificationList": {
+ "$ref": "#/definitions/eventDomainThrottleSpecificationList"
+ }
},
- "required": [ "eventThrottlingMode" ]
+ "required": [
+ "eventThrottlingMode"
+ ]
},
"faultFields": {
"description": "fields specific to fault events",
@@ -629,41 +716,82 @@ ]
}
},
- "required": [ "alarmCondition", "eventSeverity", "eventSourceType",
- "faultFieldsVersion", "specificProblem", "vfStatus" ]
+ "required": [
+ "alarmCondition",
+ "eventSeverity",
+ "eventSourceType",
+ "faultFieldsVersion",
+ "specificProblem",
+ "vfStatus"
+ ]
},
"featuresInUse": {
"description": "number of times an identified feature was used over the measurementInterval",
"type": "object",
"properties": {
- "featureIdentifier": { "type": "string" },
- "featureUtilization": { "type": "integer" }
+ "featureIdentifier": {
+ "type": "string"
+ },
+ "featureUtilization": {
+ "type": "integer"
+ }
},
- "required": [ "featureIdentifier", "featureUtilization" ]
+ "required": [
+ "featureIdentifier",
+ "featureUtilization"
+ ]
},
"field": {
"description": "name value pair",
"type": "object",
"properties": {
- "name": { "type": "string" },
- "value": { "type": "string" }
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
},
- "required": [ "name", "value" ]
+ "required": [
+ "name",
+ "value"
+ ]
},
"filesystemUsage": {
"description": "disk usage of an identified virtual machine in gigabytes and/or gigabytes per second",
"type": "object",
"properties": {
- "blockConfigured": { "type": "number" },
- "blockIops": { "type": "number" },
- "blockUsed": { "type": "number" },
- "ephemeralConfigured": { "type": "number" },
- "ephemeralIops": { "type": "number" },
- "ephemeralUsed": { "type": "number" },
- "filesystemName": { "type": "string" }
+ "blockConfigured": {
+ "type": "number"
+ },
+ "blockIops": {
+ "type": "number"
+ },
+ "blockUsed": {
+ "type": "number"
+ },
+ "ephemeralConfigured": {
+ "type": "number"
+ },
+ "ephemeralIops": {
+ "type": "number"
+ },
+ "ephemeralUsed": {
+ "type": "number"
+ },
+ "filesystemName": {
+ "type": "string"
+ }
},
- "required": [ "blockConfigured", "blockIops", "blockUsed", "ephemeralConfigured",
- "ephemeralIops", "ephemeralUsed", "filesystemName" ]
+ "required": [
+ "blockConfigured",
+ "blockIops",
+ "blockUsed",
+ "ephemeralConfigured",
+ "ephemeralIops",
+ "ephemeralUsed",
+ "filesystemName"
+ ]
},
"gtpPerFlowMetrics": {
"description": "Mobility GTP Protocol per flow metrics",
@@ -743,12 +871,16 @@ },
"ipTosCountList": {
"description": "array of key: value pairs where the keys are drawn from the IP Type-of-Service identifiers which range from '0' to '255', and the values are the count of packets that had those ToS identifiers in the flow",
- "type": "array",
- "items": {
+ "type": "array",
+ "items": {
"type": "array",
"items": [
- { "type": "string" },
- { "type": "number" }
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
]
}
},
@@ -781,12 +913,16 @@ },
"mobileQciCosCountList": {
"description": "array of key: value pairs where the keys are drawn from LTE QCI or UMTS class of service strings, and the values are the count of packets that had those strings in the flow",
- "type": "array",
- "items": {
+ "type": "array",
+ "items": {
"type": "array",
"items": [
- { "type": "string" },
- { "type": "number" }
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
]
}
},
@@ -879,12 +1015,16 @@ },
"tcpFlagCountList": {
"description": "array of key: value pairs where the keys are drawn from TCP Flags and the values are the count of packets that had that TCP Flag in the flow",
- "type": "array",
- "items": {
+ "type": "array",
+ "items": {
"type": "array",
"items": [
- { "type": "string" },
- { "type": "number" }
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
]
}
},
@@ -900,21 +1040,37 @@ "type": "number"
}
},
- "required": [ "avgBitErrorRate", "avgPacketDelayVariation", "avgPacketLatency",
- "avgReceiveThroughput", "avgTransmitThroughput",
- "flowActivationEpoch", "flowActivationMicrosec",
- "flowDeactivationEpoch", "flowDeactivationMicrosec",
- "flowDeactivationTime", "flowStatus",
- "maxPacketDelayVariation", "numActivationFailures",
- "numBitErrors", "numBytesReceived", "numBytesTransmitted",
- "numDroppedPackets", "numL7BytesReceived",
- "numL7BytesTransmitted", "numLostPackets",
- "numOutOfOrderPackets", "numPacketErrors",
- "numPacketsReceivedExclRetrans",
- "numPacketsReceivedInclRetrans",
- "numPacketsTransmittedInclRetrans",
- "numRetries", "numTimeouts", "numTunneledL7BytesReceived",
- "roundTripTime", "timeToFirstByte"
+ "required": [
+ "avgBitErrorRate",
+ "avgPacketDelayVariation",
+ "avgPacketLatency",
+ "avgReceiveThroughput",
+ "avgTransmitThroughput",
+ "flowActivationEpoch",
+ "flowActivationMicrosec",
+ "flowDeactivationEpoch",
+ "flowDeactivationMicrosec",
+ "flowDeactivationTime",
+ "flowStatus",
+ "maxPacketDelayVariation",
+ "numActivationFailures",
+ "numBitErrors",
+ "numBytesReceived",
+ "numBytesTransmitted",
+ "numDroppedPackets",
+ "numL7BytesReceived",
+ "numL7BytesTransmitted",
+ "numLostPackets",
+ "numOutOfOrderPackets",
+ "numPacketErrors",
+ "numPacketsReceivedExclRetrans",
+ "numPacketsReceivedInclRetrans",
+ "numPacketsTransmittedInclRetrans",
+ "numRetries",
+ "numTimeouts",
+ "numTunneledL7BytesReceived",
+ "roundTripTime",
+ "timeToFirstByte"
]
},
"heartbeatFields": {
@@ -937,7 +1093,10 @@ "type": "integer"
}
},
- "required": [ "heartbeatFieldsVersion", "heartbeatInterval" ]
+ "required": [
+ "heartbeatFieldsVersion",
+ "heartbeatInterval"
+ ]
},
"internalHeaderFields": {
"description": "enrichment fields for internal VES Event Listener service use only, not supplied by event sources",
@@ -947,86 +1106,101 @@ "description": "json object schema, name and other meta-information along with one or more object instances",
"type": "object",
"properties": {
- "objectInstances": {
- "description": "one or more instances of the jsonObject",
- "type": "array",
- "items": {
- "$ref": "#/definitions/jsonObjectInstance"
- }
- },
- "objectName": {
- "description": "name of the JSON Object",
- "type": "string"
- },
- "objectSchema": {
- "description": "json schema for the object",
- "type": "string"
- },
- "objectSchemaUrl": {
- "description": "Url to the json schema for the object",
- "type": "string"
- },
- "nfSubscribedObjectName": {
- "description": "name of the object associated with the nfSubscriptonId",
- "type": "string"
- },
- "nfSubscriptionId": {
- "description": "identifies an openConfig telemetry subscription on a network function, which configures the network function to send complex object data associated with the jsonObject",
- "type": "string"
- }
+ "objectInstances": {
+ "description": "one or more instances of the jsonObject",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/jsonObjectInstance"
+ }
+ },
+ "objectName": {
+ "description": "name of the JSON Object",
+ "type": "string"
+ },
+ "objectSchema": {
+ "description": "json schema for the object",
+ "type": "string"
+ },
+ "objectSchemaUrl": {
+ "description": "Url to the json schema for the object",
+ "type": "string"
+ },
+ "nfSubscribedObjectName": {
+ "description": "name of the object associated with the nfSubscriptonId",
+ "type": "string"
+ },
+ "nfSubscriptionId": {
+ "description": "identifies an openConfig telemetry subscription on a network function, which configures the network function to send complex object data associated with the jsonObject",
+ "type": "string"
+ }
},
- "required": [ "objectInstances", "objectName" ]
+ "required": [
+ "objectInstances",
+ "objectName"
+ ]
},
"jsonObjectInstance": {
"description": "meta-information about an instance of a jsonObject along with the actual object instance",
"type": "object",
"properties": {
- "objectInstance": {
- "description": "an instance conforming to the jsonObject schema",
- "type": "object"
- },
- "objectInstanceEpochMicrosec": {
- "description": "the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds",
- "type": "number"
- },
- "objectKeys": {
- "description": "an ordered set of keys that identifies this particular instance of jsonObject",
- "type": "array",
- "items": {
- "$ref": "#/definitions/key"
- }
- }
+ "objectInstance": {
+ "description": "an instance conforming to the jsonObject schema",
+ "type": "object"
+ },
+ "objectInstanceEpochMicrosec": {
+ "description": "the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds",
+ "type": "number"
+ },
+ "objectKeys": {
+ "description": "an ordered set of keys that identifies this particular instance of jsonObject",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/key"
+ }
+ }
},
- "required": [ "objectInstance" ]
+ "required": [
+ "objectInstance"
+ ]
},
"key": {
"description": "tuple which provides the name of a key along with its value and relative order",
"type": "object",
"properties": {
- "keyName": {
- "description": "name of the key",
- "type": "string"
+ "keyName": {
+ "description": "name of the key",
+ "type": "string"
},
- "keyOrder": {
- "description": "relative sequence or order of the key with respect to other keys",
- "type": "integer"
+ "keyOrder": {
+ "description": "relative sequence or order of the key with respect to other keys",
+ "type": "integer"
},
- "keyValue": {
- "description": "value of the key",
- "type": "string"
+ "keyValue": {
+ "description": "value of the key",
+ "type": "string"
}
},
- "required": [ "keyName" ]
+ "required": [
+ "keyName"
+ ]
},
"latencyBucketMeasure": {
"description": "number of counts falling within a defined latency bucket",
"type": "object",
"properties": {
- "countsInTheBucket": { "type": "number" },
- "highEndOfLatencyBucket": { "type": "number" },
- "lowEndOfLatencyBucket": { "type": "number" }
+ "countsInTheBucket": {
+ "type": "number"
+ },
+ "highEndOfLatencyBucket": {
+ "type": "number"
+ },
+ "lowEndOfLatencyBucket": {
+ "type": "number"
+ }
},
- "required": [ "countsInTheBucket" ]
+ "required": [
+ "countsInTheBucket"
+ ]
},
"measurementsForVfScalingFields": {
"description": "measurementsForVfScaling fields",
@@ -1046,13 +1220,13 @@ "$ref": "#/definitions/namedArrayOfFields"
}
},
- "additionalObjects": {
- "description": "array of JSON objects described by name, schema and other meta-information",
+ "additionalObjects": {
+ "description": "array of JSON objects described by name, schema and other meta-information",
"type": "array",
"items": {
- "$ref": "#/definitions/jsonObject"
+ "$ref": "#/definitions/jsonObject"
}
- },
+ },
"codecUsageArray": {
"description": "array of codecs in use",
"type": "array",
@@ -1075,7 +1249,7 @@ "$ref": "#/definitions/cpuUsage"
}
},
- "diskUsageArray": {
+ "diskUsageArray": {
"description": "usage of an array of disks",
"type": "array",
"items": {
@@ -1142,46 +1316,53 @@ }
}
},
- "required": [ "measurementInterval", "measurementsForVfScalingVersion" ]
+ "required": [
+ "measurementInterval",
+ "measurementsForVfScalingVersion"
+ ]
},
"memoryUsage": {
"description": "memory usage of an identified virtual machine",
"type": "object",
"properties": {
- "memoryBuffered": {
- "description": "kibibytes of temporary storage for raw disk blocks",
- "type": "number"
- },
- "memoryCached": {
- "description": "kibibytes of memory used for cache",
- "type": "number"
- },
- "memoryConfigured": {
- "description": "kibibytes of memory configured in the virtual machine on which the VNFC reporting the event is running",
- "type": "number"
- },
- "memoryFree": {
- "description": "kibibytes of physical RAM left unused by the system",
- "type": "number"
- },
- "memorySlabRecl": {
- "description": "the part of the slab that can be reclaimed such as caches measured in kibibytes",
- "type": "number"
- },
- "memorySlabUnrecl": {
- "description": "the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes",
- "type": "number"
- },
- "memoryUsed": {
- "description": "total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes",
- "type": "number"
- },
- "vmIdentifier": {
- "description": "virtual machine identifier associated with the memory metrics",
- "type": "string"
- }
+ "memoryBuffered": {
+ "description": "kibibytes of temporary storage for raw disk blocks",
+ "type": "number"
+ },
+ "memoryCached": {
+ "description": "kibibytes of memory used for cache",
+ "type": "number"
+ },
+ "memoryConfigured": {
+ "description": "kibibytes of memory configured in the virtual machine on which the VNFC reporting the event is running",
+ "type": "number"
+ },
+ "memoryFree": {
+ "description": "kibibytes of physical RAM left unused by the system",
+ "type": "number"
+ },
+ "memorySlabRecl": {
+ "description": "the part of the slab that can be reclaimed such as caches measured in kibibytes",
+ "type": "number"
+ },
+ "memorySlabUnrecl": {
+ "description": "the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes",
+ "type": "number"
+ },
+ "memoryUsed": {
+ "description": "total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes",
+ "type": "number"
+ },
+ "vmIdentifier": {
+ "description": "virtual machine identifier associated with the memory metrics",
+ "type": "string"
+ }
},
- "required": [ "memoryFree", "memoryUsed", "vmIdentifier" ]
+ "required": [
+ "memoryFree",
+ "memoryUsed",
+ "vmIdentifier"
+ ]
},
"mobileFlowFields": {
"description": "mobileFlow fields",
@@ -1222,7 +1403,9 @@ "description": "Flow direction, indicating if the reporting node is the source of the flow or destination for the flow",
"type": "string"
},
- "gtpPerFlowMetrics": { "$ref": "#/definitions/gtpPerFlowMetrics" },
+ "gtpPerFlowMetrics": {
+ "$ref": "#/definitions/gtpPerFlowMetrics"
+ },
"gtpProtocolType": {
"description": "GTP protocol",
"type": "string"
@@ -1263,10 +1446,10 @@ "description": "mobile network code",
"type": "string"
},
- "mobileFlowFieldsVersion": {
- "description": "version of the mobileFlowFields block",
- "type": "number"
- },
+ "mobileFlowFieldsVersion": {
+ "description": "version of the mobileFlowFields block",
+ "type": "number"
+ },
"msisdn": {
"description": "MSISDN for the subscriber UE used in this flow, as an integer, if the flow connects to a mobile device",
"type": "string"
@@ -1320,24 +1503,37 @@ "type": "string"
}
},
- "required": [ "flowDirection", "gtpPerFlowMetrics", "ipProtocolType", "ipVersion",
- "mobileFlowFieldsVersion", "otherEndpointIpAddress", "otherEndpointPort",
- "reportingEndpointIpAddr", "reportingEndpointPort" ]
+ "required": [
+ "flowDirection",
+ "gtpPerFlowMetrics",
+ "ipProtocolType",
+ "ipVersion",
+ "mobileFlowFieldsVersion",
+ "otherEndpointIpAddress",
+ "otherEndpointPort",
+ "reportingEndpointIpAddr",
+ "reportingEndpointPort"
+ ]
},
"namedArrayOfFields": {
"description": "an array of name value pairs along with a name for the array",
"type": "object",
"properties": {
- "name": { "type": "string" },
+ "name": {
+ "type": "string"
+ },
"arrayOfFields": {
"description": "array of name value pairs",
"type": "array",
- "items": {
- "$ref": "#/definitions/field"
+ "items": {
+ "$ref": "#/definitions/field"
}
}
},
- "required": [ "name", "arrayOfFields" ]
+ "required": [
+ "name",
+ "arrayOfFields"
+ ]
},
"otherFields": {
"description": "fields for events belonging to the 'other' domain of the commonEventHeader domain enumeration",
@@ -1350,32 +1546,34 @@ "$ref": "#/definitions/namedArrayOfFields"
}
},
- "jsonObjects": {
- "description": "array of JSON objects described by name, schema and other meta-information",
+ "jsonObjects": {
+ "description": "array of JSON objects described by name, schema and other meta-information",
"type": "array",
"items": {
- "$ref": "#/definitions/jsonObject"
+ "$ref": "#/definitions/jsonObject"
}
- },
+ },
"nameValuePairs": {
"description": "array of name-value pairs",
"type": "array",
"items": {
"$ref": "#/definitions/field"
}
- },
- "otherFieldsVersion": {
- "description": "version of the otherFields block",
- "type": "number"
- }
- },
- "required": [ "otherFieldsVersion" ]
+ },
+ "otherFieldsVersion": {
+ "description": "version of the otherFields block",
+ "type": "number"
+ }
+ },
+ "required": [
+ "otherFieldsVersion"
+ ]
},
"requestError": {
"description": "standard request error data structure",
"type": "object",
"properties": {
- "messageId": {
+ "messageId": {
"description": "Unique message identifier of the format ABCnnnn where ABC is either SVC for Service Exceptions or POL for Policy Exception",
"type": "string"
},
@@ -1392,58 +1590,68 @@ "type": "string"
}
},
- "required": [ "messageId", "text" ]
+ "required": [
+ "messageId",
+ "text"
+ ]
},
- "sipSignalingFields": {
- "description": "sip signaling fields",
- "type": "object",
- "properties": {
- "additionalInformation": {
+ "sipSignalingFields": {
+ "description": "sip signaling fields",
+ "type": "object",
+ "properties": {
+ "additionalInformation": {
"description": "additional sip signaling fields if needed",
"type": "array",
- "items": {
- "$ref": "#/definitions/field"
+ "items": {
+ "$ref": "#/definitions/field"
}
- },
- "compressedSip": {
- "description": "the full SIP request/response including headers and bodies",
- "type": "string"
- },
- "correlator": {
- "description": "this is the same for all events on this call",
- "type": "string"
- },
- "localIpAddress": {
- "description": "IP address on VNF",
- "type": "string"
- },
- "localPort": {
- "description": "port on VNF",
- "type": "string"
- },
- "remoteIpAddress": {
- "description": "IP address of peer endpoint",
- "type": "string"
- },
- "remotePort": {
- "description": "port of peer endpoint",
- "type": "string"
- },
- "sipSignalingFieldsVersion": {
- "description": "version of the sipSignalingFields block",
- "type": "number"
- },
- "summarySip": {
- "description": "the SIP Method or Response (‘INVITE’, ‘200 OK’, ‘BYE’, etc)",
- "type": "string"
- },
- "vendorVnfNameFields": {
- "$ref": "#/definitions/vendorVnfNameFields"
- }
- },
- "required": [ "correlator", "localIpAddress", "localPort", "remoteIpAddress",
- "remotePort", "sipSignalingFieldsVersion", "vendorVnfNameFields" ]
- },
+ },
+ "compressedSip": {
+ "description": "the full SIP request/response including headers and bodies",
+ "type": "string"
+ },
+ "correlator": {
+ "description": "this is the same for all events on this call",
+ "type": "string"
+ },
+ "localIpAddress": {
+ "description": "IP address on VNF",
+ "type": "string"
+ },
+ "localPort": {
+ "description": "port on VNF",
+ "type": "string"
+ },
+ "remoteIpAddress": {
+ "description": "IP address of peer endpoint",
+ "type": "string"
+ },
+ "remotePort": {
+ "description": "port of peer endpoint",
+ "type": "string"
+ },
+ "sipSignalingFieldsVersion": {
+ "description": "version of the sipSignalingFields block",
+ "type": "number"
+ },
+ "summarySip": {
+ "description": "the SIP Method or Response (‘INVITE’, ‘200 OK’, ‘BYE’, etc)",
+ "type": "string"
+ },
+ "vendorVnfNameFields": {
+ "$ref": "#/definitions/vendorVnfNameFields"
+ }
+ },
+ "required": [
+ "correlator",
+ "localIpAddress",
+ "localPort",
+ "remoteIpAddress",
+ "remotePort",
+ "sipSignalingFieldsVersion",
+ "vendorVnfNameFields"
+ ]
+ },
"stateChangeFields": {
"description": "stateChange fields",
"type": "object",
@@ -1482,7 +1690,12 @@ "type": "string"
}
},
- "required": [ "newState", "oldState", "stateChangeFieldsVersion", "stateInterface" ]
+ "required": [
+ "newState",
+ "oldState",
+ "stateChangeFieldsVersion",
+ "stateInterface"
+ ]
},
"suppressedNvPairs": {
"description": "List of specific NvPairsNames to suppress within a given Name-Value Field for event Throttling",
@@ -1494,13 +1707,16 @@ },
"suppressedNvPairNames": {
"description": "Array of nvpair names to suppress within the nvpairFieldName",
- "type": "array",
+ "type": "array",
"items": {
- "type": "string"
+ "type": "string"
}
}
},
- "required": [ "nvPairFieldName", "suppressedNvPairNames" ]
+ "required": [
+ "nvPairFieldName",
+ "suppressedNvPairNames"
+ ]
},
"syslogFields": {
"description": "sysLog fields",
@@ -1573,7 +1789,12 @@ "type": "number"
}
},
- "required": [ "eventSourceType", "syslogFieldsVersion", "syslogMsg", "syslogTag" ]
+ "required": [
+ "eventSourceType",
+ "syslogFieldsVersion",
+ "syslogMsg",
+ "syslogTag"
+ ]
},
"thresholdCrossingAlertFields": {
"description": "fields specific to threshold crossing alert events",
@@ -1582,8 +1803,8 @@ "additionalFields": {
"description": "additional threshold crossing alert fields if needed",
"type": "array",
- "items": {
- "$ref": "#/definitions/field"
+ "items": {
+ "$ref": "#/definitions/field"
}
},
"additionalParameters": {
@@ -1623,7 +1844,9 @@ "associatedAlertIdList": {
"description": "List of eventIds associated with the event being reported",
"type": "array",
- "items": { "type": "string" }
+ "items": {
+ "type": "string"
+ }
},
"collectionTimestamp": {
"description": "Time when the performance collector picked up the data; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800",
@@ -1697,7 +1920,9 @@ "type": "string"
}
},
- "required": [ "vendorName" ]
+ "required": [
+ "vendorName"
+ ]
},
"vNicPerformance": {
"description": "describes the performance and errors of an identified virtual network interface card",
@@ -1818,59 +2043,71 @@ "valuesAreSuspect": {
"description": "Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other condtions",
"type": "string",
- "enum": [ "true", "false" ]
+ "enum": [
+ "true",
+ "false"
+ ]
},
"vNicIdentifier": {
"description": "vNic identification",
"type": "string"
}
},
- "required": [ "valuesAreSuspect", "vNicIdentifier" ]
+ "required": [
+ "valuesAreSuspect",
+ "vNicIdentifier"
+ ]
},
- "voiceQualityFields": {
- "description": "provides statistics related to customer facing voice products",
- "type": "object",
- "properties": {
- "additionalInformation": {
+ "voiceQualityFields": {
+ "description": "provides statistics related to customer facing voice products",
+ "type": "object",
+ "properties": {
+ "additionalInformation": {
"description": "additional voice quality fields if needed",
"type": "array",
- "items": {
- "$ref": "#/definitions/field"
+ "items": {
+ "$ref": "#/definitions/field"
}
- },
- "calleeSideCodec": {
- "description": "callee codec for the call",
- "type": "string"
- },
- "callerSideCodec": {
- "description": "caller codec for the call",
- "type": "string"
- },
- "correlator": {
- "description": "this is the same for all events on this call",
- "type": "string"
- },
- "endOfCallVqmSummaries": {
- "$ref": "#/definitions/endOfCallVqmSummaries"
- },
- "phoneNumber": {
- "description": "phone number associated with the correlator",
- "type": "string"
- },
- "midCallRtcp": {
- "description": "Base64 encoding of the binary RTCP data excluding Eth/IP/UDP headers",
- "type": "string"
- },
- "vendorVnfNameFields": {
- "$ref": "#/definitions/vendorVnfNameFields"
- },
- "voiceQualityFieldsVersion": {
- "description": "version of the voiceQualityFields block",
- "type": "number"
- }
- },
- "required": [ "calleeSideCodec", "callerSideCodec", "correlator", "midCallRtcp",
- "vendorVnfNameFields", "voiceQualityFieldsVersion" ]
- }
+ },
+ "calleeSideCodec": {
+ "description": "callee codec for the call",
+ "type": "string"
+ },
+ "callerSideCodec": {
+ "description": "caller codec for the call",
+ "type": "string"
+ },
+ "correlator": {
+ "description": "this is the same for all events on this call",
+ "type": "string"
+ },
+ "endOfCallVqmSummaries": {
+ "$ref": "#/definitions/endOfCallVqmSummaries"
+ },
+ "phoneNumber": {
+ "description": "phone number associated with the correlator",
+ "type": "string"
+ },
+ "midCallRtcp": {
+ "description": "Base64 encoding of the binary RTCP data excluding Eth/IP/UDP headers",
+ "type": "string"
+ },
+ "vendorVnfNameFields": {
+ "$ref": "#/definitions/vendorVnfNameFields"
+ },
+ "voiceQualityFieldsVersion": {
+ "description": "version of the voiceQualityFields block",
+ "type": "number"
+ }
+ },
+ "required": [
+ "calleeSideCodec",
+ "callerSideCodec",
+ "correlator",
+ "midCallRtcp",
+ "vendorVnfNameFields",
+ "voiceQualityFieldsVersion"
+ ]
+ }
}
}
\ No newline at end of file diff --git a/etc/CommonEventFormat_28.4.json b/etc/CommonEventFormat_28.4.json index cc0ce73b..4edb6115 100644 --- a/etc/CommonEventFormat_28.4.json +++ b/etc/CommonEventFormat_28.4.json @@ -1,36 +1,39 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", "title": "VES Event Listener", "type": "object", "properties": { - "event": {"$ref": "#/definitions/event"}, - "eventList": {"$ref": "#/definitions/eventList"} - }, - + "event": { + "$ref": "#/definitions/event" + }, + "eventList": { + "$ref": "#/definitions/eventList" + } + }, "definitions": { - "schemaHeaderBlock": { - "description": "schema date, version, author and associated API", - "type": "object", - "properties": { - "associatedApi": { - "description": "VES Event Listener", - "type": "string" - }, - "lastUpdatedBy": { - "description": "re2947", - "type": "string" - }, - "schemaDate": { - "description": "September 12, 2017", - "type": "string" - }, - "schemaVersion": { - "description": "28.4", - "type": "number" - } - } - }, - "attCopyrightNotice": { + "schemaHeaderBlock": { + "description": "schema date, version, author and associated API", + "type": "object", + "properties": { + "associatedApi": { + "description": "VES Event Listener", + "type": "string" + }, + "lastUpdatedBy": { + "description": "re2947", + "type": "string" + }, + "schemaDate": { + "description": "September 12, 2017", + "type": "string" + }, + "schemaVersion": { + "description": "28.4", + "type": "number" + } + } + }, + "attCopyrightNotice": { "description": "Copyright (c) <2017>, AT&T Intellectual Property. All rights reserved. Licensed under the Apache License, Version 2.0 (the License)", "type": "object", "properties": { @@ -39,8 +42,8 @@ "type": "string" }, "licenseLink": { - "description": "http://www.apache.org/licenses/LICENSE-2.0", - "type":"string" + "description": "http://www.apache.org/licenses/LICENSE-2.0", + "type": "string" }, "condition1": { "description": "Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an AS IS BASIS,", @@ -64,17 +67,23 @@ } } }, - - "codecsInUse": { + "codecsInUse": { "description": "number of times an identified codec was used over the measurementInterval", "type": "object", "properties": { - "codecIdentifier": { "type": "string" }, - "numberInUse": { "type": "integer" } + "codecIdentifier": { + "type": "string" + }, + "numberInUse": { + "type": "integer" + } }, - "required": [ "codecIdentifier", "numberInUse" ] + "required": [ + "codecIdentifier", + "numberInUse" + ] }, - "command": { + "command": { "description": "command from an event collector toward an event source", "type": "object", "properties": { @@ -87,17 +96,25 @@ "throttlingSpecification" ] }, - "eventDomainThrottleSpecification": { "$ref": "#/definitions/eventDomainThrottleSpecification" }, - "heartbeatInterval": { "type": "integer" }, - "measurementInterval": { "type": "integer" } + "eventDomainThrottleSpecification": { + "$ref": "#/definitions/eventDomainThrottleSpecification" + }, + "heartbeatInterval": { + "type": "integer" + }, + "measurementInterval": { + "type": "integer" + } }, - "required": [ "commandType" ] + "required": [ + "commandType" + ] }, "commandList": { "description": "array of commands from an event collector toward an event source", "type": "array", "items": { - "$ref": "#/definitions/command" + "$ref": "#/definitions/command" }, "minItems": 0 }, @@ -133,7 +150,9 @@ "description": "for example - applicationVnf, guestOS, hostOS, platform", "type": "string" }, - "internalHeaderFields": { "$ref": "#/definitions/internalHeaderFields" }, + "internalHeaderFields": { + "$ref": "#/definitions/internalHeaderFields" + }, "lastEpochMicrosec": { "description": "the latest unix time aka epoch time associated with the event from any component--as microseconds elapsed since 1 Jan 1970 not including leap seconds", "type": "number" @@ -185,379 +204,442 @@ "type": "number" } }, - "required": [ "domain", "eventId", "eventName", "lastEpochMicrosec", - "priority", "reportingEntityName", "sequence", "sourceName", - "startEpochMicrosec", "version" ] + "required": [ + "domain", + "eventId", + "eventName", + "lastEpochMicrosec", + "priority", + "reportingEntityName", + "sequence", + "sourceName", + "startEpochMicrosec", + "version" + ] }, "counter": { "description": "performance counter", "type": "object", "properties": { - "criticality": { "type": "string", "enum": [ "CRIT", "MAJ" ] }, - "name": { "type": "string" }, - "thresholdCrossed": { "type": "string" }, - "value": { "type": "string"} + "criticality": { + "type": "string", + "enum": [ + "CRIT", + "MAJ" + ] + }, + "name": { + "type": "string" + }, + "thresholdCrossed": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "required": [ "criticality", "name", "thresholdCrossed", "value" ] + "required": [ + "criticality", + "name", + "thresholdCrossed", + "value" + ] }, "cpuUsage": { "description": "usage of an identified CPU", "type": "object", "properties": { - "cpuIdentifier": { - "description": "cpu identifer", - "type": "string" - }, - "cpuIdle": { - "description": "percentage of CPU time spent in the idle task", - "type": "number" - }, - "cpuUsageInterrupt": { - "description": "percentage of time spent servicing interrupts", - "type": "number" - }, - "cpuUsageNice": { - "description": "percentage of time spent running user space processes that have been niced", - "type": "number" - }, - "cpuUsageSoftIrq": { - "description": "percentage of time spent handling soft irq interrupts", - "type": "number" - }, - "cpuUsageSteal": { - "description": "percentage of time spent in involuntary wait which is neither user, system or idle time and is effectively time that went missing", - "type": "number" - }, - "cpuUsageSystem": { - "description": "percentage of time spent on system tasks running the kernel", - "type": "number" - }, - "cpuUsageUser": { - "description": "percentage of time spent running un-niced user space processes", - "type": "number" - }, - "cpuWait": { - "description": "percentage of CPU time spent waiting for I/O operations to complete", - "type": "number" - }, - "percentUsage": { - "description": "aggregate cpu usage of the virtual machine on which the VNFC reporting the event is running", - "type": "number" - } + "cpuIdentifier": { + "description": "cpu identifer", + "type": "string" + }, + "cpuIdle": { + "description": "percentage of CPU time spent in the idle task", + "type": "number" + }, + "cpuUsageInterrupt": { + "description": "percentage of time spent servicing interrupts", + "type": "number" + }, + "cpuUsageNice": { + "description": "percentage of time spent running user space processes that have been niced", + "type": "number" + }, + "cpuUsageSoftIrq": { + "description": "percentage of time spent handling soft irq interrupts", + "type": "number" + }, + "cpuUsageSteal": { + "description": "percentage of time spent in involuntary wait which is neither user, system or idle time and is effectively time that went missing", + "type": "number" + }, + "cpuUsageSystem": { + "description": "percentage of time spent on system tasks running the kernel", + "type": "number" + }, + "cpuUsageUser": { + "description": "percentage of time spent running un-niced user space processes", + "type": "number" + }, + "cpuWait": { + "description": "percentage of CPU time spent waiting for I/O operations to complete", + "type": "number" + }, + "percentUsage": { + "description": "aggregate cpu usage of the virtual machine on which the VNFC reporting the event is running", + "type": "number" + } }, - "required": [ "cpuIdentifier", "percentUsage" ] + "required": [ + "cpuIdentifier", + "percentUsage" + ] }, "diskUsage": { "description": "usage of an identified disk", "type": "object", "properties": { - "diskIdentifier": { - "description": "disk identifier", - "type": "string" - }, - "diskIoTimeAvg": { - "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the average over the measurement interval", - "type": "number" - }, - "diskIoTimeLast": { - "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the last value measurement within the measurement interval", - "type": "number" - }, - "diskIoTimeMax": { - "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the maximum value measurement within the measurement interval", - "type": "number" - }, - "diskIoTimeMin": { - "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the minimum value measurement within the measurement interval", - "type": "number" - }, - "diskMergedReadAvg": { - "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskMergedReadLast": { - "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the last value measurement within the measurement interval", - "type": "number" - }, - "diskMergedReadMax": { - "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the maximum value measurement within the measurement interval", - "type": "number" - }, - "diskMergedReadMin": { - "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the minimum value measurement within the measurement interval", - "type": "number" - }, - "diskMergedWriteAvg": { - "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskMergedWriteLast": { - "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the last value measurement within the measurement interval", - "type": "number" - }, - "diskMergedWriteMax": { - "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the maximum value measurement within the measurement interval", - "type": "number" - }, - "diskMergedWriteMin": { - "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the minimum value measurement within the measurement interval", - "type": "number" - }, - "diskOctetsReadAvg": { - "description": "number of octets per second read from a disk or partition; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskOctetsReadLast": { - "description": "number of octets per second read from a disk or partition; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskOctetsReadMax": { - "description": "number of octets per second read from a disk or partition; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskOctetsReadMin": { - "description": "number of octets per second read from a disk or partition; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskOctetsWriteAvg": { - "description": "number of octets per second written to a disk or partition; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskOctetsWriteLast": { - "description": "number of octets per second written to a disk or partition; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskOctetsWriteMax": { - "description": "number of octets per second written to a disk or partition; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskOctetsWriteMin": { - "description": "number of octets per second written to a disk or partition; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskOpsReadAvg": { - "description": "number of read operations per second issued to the disk; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskOpsReadLast": { - "description": "number of read operations per second issued to the disk; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskOpsReadMax": { - "description": "number of read operations per second issued to the disk; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskOpsReadMin": { - "description": "number of read operations per second issued to the disk; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskOpsWriteAvg": { - "description": "number of write operations per second issued to the disk; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskOpsWriteLast": { - "description": "number of write operations per second issued to the disk; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskOpsWriteMax": { - "description": "number of write operations per second issued to the disk; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskOpsWriteMin": { - "description": "number of write operations per second issued to the disk; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskPendingOperationsAvg": { - "description": "queue size of pending I/O operations per second; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskPendingOperationsLast": { - "description": "queue size of pending I/O operations per second; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskPendingOperationsMax": { - "description": "queue size of pending I/O operations per second; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskPendingOperationsMin": { - "description": "queue size of pending I/O operations per second; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskTimeReadAvg": { - "description": "milliseconds a read operation took to complete; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskTimeReadLast": { - "description": "milliseconds a read operation took to complete; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskTimeReadMax": { - "description": "milliseconds a read operation took to complete; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskTimeReadMin": { - "description": "milliseconds a read operation took to complete; provide the minimum measurement within the measurement interval", - "type": "number" - }, - "diskTimeWriteAvg": { - "description": "milliseconds a write operation took to complete; provide the average measurement within the measurement interval", - "type": "number" - }, - "diskTimeWriteLast": { - "description": "milliseconds a write operation took to complete; provide the last measurement within the measurement interval", - "type": "number" - }, - "diskTimeWriteMax": { - "description": "milliseconds a write operation took to complete; provide the maximum measurement within the measurement interval", - "type": "number" - }, - "diskTimeWriteMin": { - "description": "milliseconds a write operation took to complete; provide the minimum measurement within the measurement interval", - "type": "number" - } + "diskIdentifier": { + "description": "disk identifier", + "type": "string" + }, + "diskIoTimeAvg": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the average over the measurement interval", + "type": "number" + }, + "diskIoTimeLast": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the last value measurement within the measurement interval", + "type": "number" + }, + "diskIoTimeMax": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the maximum value measurement within the measurement interval", + "type": "number" + }, + "diskIoTimeMin": { + "description": "milliseconds spent doing input/output operations over 1 sec; treat this metric as a device load percentage where 1000ms matches 100% load; provide the minimum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadAvg": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadLast": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the last value measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadMax": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the maximum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedReadMin": { + "description": "number of logical read operations that were merged into physical read operations, e.g., two logical reads were served by one physical disk access; provide the minimum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteAvg": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteLast": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the last value measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteMax": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the maximum value measurement within the measurement interval", + "type": "number" + }, + "diskMergedWriteMin": { + "description": "number of logical write operations that were merged into physical write operations, e.g., two logical writes were served by one physical disk access; provide the minimum value measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadAvg": { + "description": "number of octets per second read from a disk or partition; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadLast": { + "description": "number of octets per second read from a disk or partition; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadMax": { + "description": "number of octets per second read from a disk or partition; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOctetsReadMin": { + "description": "number of octets per second read from a disk or partition; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteAvg": { + "description": "number of octets per second written to a disk or partition; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteLast": { + "description": "number of octets per second written to a disk or partition; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteMax": { + "description": "number of octets per second written to a disk or partition; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOctetsWriteMin": { + "description": "number of octets per second written to a disk or partition; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadAvg": { + "description": "number of read operations per second issued to the disk; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadLast": { + "description": "number of read operations per second issued to the disk; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadMax": { + "description": "number of read operations per second issued to the disk; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOpsReadMin": { + "description": "number of read operations per second issued to the disk; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteAvg": { + "description": "number of write operations per second issued to the disk; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteLast": { + "description": "number of write operations per second issued to the disk; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteMax": { + "description": "number of write operations per second issued to the disk; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskOpsWriteMin": { + "description": "number of write operations per second issued to the disk; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsAvg": { + "description": "queue size of pending I/O operations per second; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsLast": { + "description": "queue size of pending I/O operations per second; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsMax": { + "description": "queue size of pending I/O operations per second; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskPendingOperationsMin": { + "description": "queue size of pending I/O operations per second; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadAvg": { + "description": "milliseconds a read operation took to complete; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadLast": { + "description": "milliseconds a read operation took to complete; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadMax": { + "description": "milliseconds a read operation took to complete; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskTimeReadMin": { + "description": "milliseconds a read operation took to complete; provide the minimum measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteAvg": { + "description": "milliseconds a write operation took to complete; provide the average measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteLast": { + "description": "milliseconds a write operation took to complete; provide the last measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteMax": { + "description": "milliseconds a write operation took to complete; provide the maximum measurement within the measurement interval", + "type": "number" + }, + "diskTimeWriteMin": { + "description": "milliseconds a write operation took to complete; provide the minimum measurement within the measurement interval", + "type": "number" + } + }, + "required": [ + "diskIdentifier" + ] + }, + "endOfCallVqmSummaries": { + "description": "provides end of call voice quality metrics", + "type": "object", + "properties": { + "adjacencyName": { + "description": " adjacency name", + "type": "string" + }, + "endpointDescription": { + "description": "Either Caller or Callee", + "type": "string", + "enum": [ + "Caller", + "Callee" + ] + }, + "endpointJitter": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsDiscarded": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsReceived": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsSent": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsDiscarded": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsReceived": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsSent": { + "description": "", + "type": "number" + }, + "localJitter": { + "description": "", + "type": "number" + }, + "localRtpOctetsDiscarded": { + "description": "", + "type": "number" + }, + "localRtpOctetsReceived": { + "description": "", + "type": "number" + }, + "localRtpOctetsSent": { + "description": "", + "type": "number" + }, + "localRtpPacketsDiscarded": { + "description": "", + "type": "number" + }, + "localRtpPacketsReceived": { + "description": "", + "type": "number" + }, + "localRtpPacketsSent": { + "description": "", + "type": "number" + }, + "mosCqe": { + "description": "1-5 1dp", + "type": "number" + }, + "packetsLost": { + "description": "", + "type": "number" + }, + "packetLossPercent": { + "description": "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)", + "type": "number" + }, + "rFactor": { + "description": "0-100", + "type": "number" + }, + "roundTripDelay": { + "description": "millisecs", + "type": "number" + } }, - "required": [ "diskIdentifier" ] + "required": [ + "adjacencyName", + "endpointDescription" + ] }, - "endOfCallVqmSummaries": { - "description": "provides end of call voice quality metrics", + "event": { + "description": "the root level of the common event format", "type": "object", "properties": { - "adjacencyName": { - "description": " adjacency name", - "type": "string" - }, - "endpointDescription": { - "description": "Either Caller or Callee", - "type": "string", - "enum": ["Caller", "Callee"] - }, - "endpointJitter": { - "description": "", - "type": "number" - }, - "endpointRtpOctetsDiscarded": { - "description": "", - "type": "number" - }, - "endpointRtpOctetsReceived": { - "description": "", - "type": "number" - }, - "endpointRtpOctetsSent": { - "description": "", - "type": "number" - }, - "endpointRtpPacketsDiscarded": { - "description": "", - "type": "number" - }, - "endpointRtpPacketsReceived": { - "description": "", - "type": "number" - }, - "endpointRtpPacketsSent": { - "description": "", - "type": "number" - }, - "localJitter": { - "description": "", - "type": "number" - }, - "localRtpOctetsDiscarded": { - "description": "", - "type": "number" - }, - "localRtpOctetsReceived": { - "description": "", - "type": "number" - }, - "localRtpOctetsSent": { - "description": "", - "type": "number" - }, - "localRtpPacketsDiscarded": { - "description": "", - "type": "number" - }, - "localRtpPacketsReceived": { - "description": "", - "type": "number" - }, - "localRtpPacketsSent": { - "description": "", - "type": "number" - }, - "mosCqe": { - "description": "1-5 1dp", - "type": "number" - }, - "packetsLost": { - "description": "", - "type": "number" - }, - "packetLossPercent": { - "description" : "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)", - "type": "number" - }, - "rFactor": { - "description": "0-100", - "type": "number" - }, - "roundTripDelay": { - "description": "millisecs", - "type": "number" - } - }, - "required": [ "adjacencyName", "endpointDescription" ] - }, - "event": { - "description": "the root level of the common event format", - "type": "object", - "properties": { - "commonEventHeader": { "$ref": "#/definitions/commonEventHeader" }, - "faultFields": { "$ref": "#/definitions/faultFields" }, - "heartbeatFields": { "$ref": "#/definitions/heartbeatFields" }, - "measurementsForVfScalingFields": { "$ref": "#/definitions/measurementsForVfScalingFields" }, - "mobileFlowFields": { "$ref": "#/definitions/mobileFlowFields" }, - "otherFields": { "$ref": "#/definitions/otherFields" }, - "sipSignalingFields": { "$ref": "#/definitions/sipSignalingFields" }, - "stateChangeFields": { "$ref": "#/definitions/stateChangeFields" }, - "syslogFields": { "$ref": "#/definitions/syslogFields" }, - "thresholdCrossingAlertFields": { "$ref": "#/definitions/thresholdCrossingAlertFields" }, - "voiceQualityFields": { "$ref": "#/definitions/voiceQualityFields" } - }, - "required": [ "commonEventHeader" ] - }, + "commonEventHeader": { + "$ref": "#/definitions/commonEventHeader" + }, + "faultFields": { + "$ref": "#/definitions/faultFields" + }, + "heartbeatFields": { + "$ref": "#/definitions/heartbeatFields" + }, + "measurementsForVfScalingFields": { + "$ref": "#/definitions/measurementsForVfScalingFields" + }, + "mobileFlowFields": { + "$ref": "#/definitions/mobileFlowFields" + }, + "otherFields": { + "$ref": "#/definitions/otherFields" + }, + "sipSignalingFields": { + "$ref": "#/definitions/sipSignalingFields" + }, + "stateChangeFields": { + "$ref": "#/definitions/stateChangeFields" + }, + "syslogFields": { + "$ref": "#/definitions/syslogFields" + }, + "thresholdCrossingAlertFields": { + "$ref": "#/definitions/thresholdCrossingAlertFields" + }, + "voiceQualityFields": { + "$ref": "#/definitions/voiceQualityFields" + } + }, + "required": [ + "commonEventHeader" + ] + }, "eventDomainThrottleSpecification": { "description": "specification of what information to suppress within an event domain", "type": "object", "properties": { - "eventDomain": { - "description": "Event domain enum from the commonEventHeader domain field", - "type": "string" - }, - "suppressedFieldNames": { - "description": "List of optional field names in the event block that should not be sent to the Event Listener", - "type": "array", + "eventDomain": { + "description": "Event domain enum from the commonEventHeader domain field", + "type": "string" + }, + "suppressedFieldNames": { + "description": "List of optional field names in the event block that should not be sent to the Event Listener", + "type": "array", "items": { - "type": "string" + "type": "string" } - }, + }, "suppressedNvPairsList": { "description": "Optional list of specific NvPairsNames to suppress within a given Name-Value Field", - "type": "array", + "type": "array", "items": { - "$ref": "#/definitions/suppressedNvPairs" + "$ref": "#/definitions/suppressedNvPairs" } - } + } }, - "required": [ "eventDomain" ] + "required": [ + "eventDomain" + ] }, "eventDomainThrottleSpecificationList": { "description": "array of eventDomainThrottleSpecifications", "type": "array", "items": { - "$ref": "#/definitions/eventDomainThrottleSpecification" + "$ref": "#/definitions/eventDomainThrottleSpecification" }, "minItems": 0 }, @@ -572,17 +654,21 @@ "description": "reports the throttling in force at the event source", "type": "object", "properties": { - "eventThrottlingMode": { - "description": "Mode the event manager is in", - "type": "string", + "eventThrottlingMode": { + "description": "Mode the event manager is in", + "type": "string", "enum": [ "normal", "throttled" ] - }, - "eventDomainThrottleSpecificationList": { "$ref": "#/definitions/eventDomainThrottleSpecificationList" } + }, + "eventDomainThrottleSpecificationList": { + "$ref": "#/definitions/eventDomainThrottleSpecificationList" + } }, - "required": [ "eventThrottlingMode" ] + "required": [ + "eventThrottlingMode" + ] }, "faultFields": { "description": "fields specific to fault events", @@ -642,41 +728,82 @@ ] } }, - "required": [ "alarmCondition", "eventSeverity", "eventSourceType", - "faultFieldsVersion", "specificProblem", "vfStatus" ] + "required": [ + "alarmCondition", + "eventSeverity", + "eventSourceType", + "faultFieldsVersion", + "specificProblem", + "vfStatus" + ] }, "featuresInUse": { "description": "number of times an identified feature was used over the measurementInterval", "type": "object", "properties": { - "featureIdentifier": { "type": "string" }, - "featureUtilization": { "type": "integer" } + "featureIdentifier": { + "type": "string" + }, + "featureUtilization": { + "type": "integer" + } }, - "required": [ "featureIdentifier", "featureUtilization" ] + "required": [ + "featureIdentifier", + "featureUtilization" + ] }, "field": { "description": "name value pair", "type": "object", "properties": { - "name": { "type": "string" }, - "value": { "type": "string" } + "name": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "required": [ "name", "value" ] + "required": [ + "name", + "value" + ] }, "filesystemUsage": { "description": "disk usage of an identified virtual machine in gigabytes and/or gigabytes per second", "type": "object", "properties": { - "blockConfigured": { "type": "number" }, - "blockIops": { "type": "number" }, - "blockUsed": { "type": "number" }, - "ephemeralConfigured": { "type": "number" }, - "ephemeralIops": { "type": "number" }, - "ephemeralUsed": { "type": "number" }, - "filesystemName": { "type": "string" } + "blockConfigured": { + "type": "number" + }, + "blockIops": { + "type": "number" + }, + "blockUsed": { + "type": "number" + }, + "ephemeralConfigured": { + "type": "number" + }, + "ephemeralIops": { + "type": "number" + }, + "ephemeralUsed": { + "type": "number" + }, + "filesystemName": { + "type": "string" + } }, - "required": [ "blockConfigured", "blockIops", "blockUsed", "ephemeralConfigured", - "ephemeralIops", "ephemeralUsed", "filesystemName" ] + "required": [ + "blockConfigured", + "blockIops", + "blockUsed", + "ephemeralConfigured", + "ephemeralIops", + "ephemeralUsed", + "filesystemName" + ] }, "gtpPerFlowMetrics": { "description": "Mobility GTP Protocol per flow metrics", @@ -756,12 +883,16 @@ }, "ipTosCountList": { "description": "array of key: value pairs where the keys are drawn from the IP Type-of-Service identifiers which range from '0' to '255', and the values are the count of packets that had those ToS identifiers in the flow", - "type": "array", - "items": { + "type": "array", + "items": { "type": "array", "items": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, @@ -794,12 +925,16 @@ }, "mobileQciCosCountList": { "description": "array of key: value pairs where the keys are drawn from LTE QCI or UMTS class of service strings, and the values are the count of packets that had those strings in the flow", - "type": "array", - "items": { + "type": "array", + "items": { "type": "array", "items": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, @@ -892,12 +1027,16 @@ }, "tcpFlagCountList": { "description": "array of key: value pairs where the keys are drawn from TCP Flags and the values are the count of packets that had that TCP Flag in the flow", - "type": "array", - "items": { + "type": "array", + "items": { "type": "array", "items": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, @@ -913,21 +1052,37 @@ "type": "number" } }, - "required": [ "avgBitErrorRate", "avgPacketDelayVariation", "avgPacketLatency", - "avgReceiveThroughput", "avgTransmitThroughput", - "flowActivationEpoch", "flowActivationMicrosec", - "flowDeactivationEpoch", "flowDeactivationMicrosec", - "flowDeactivationTime", "flowStatus", - "maxPacketDelayVariation", "numActivationFailures", - "numBitErrors", "numBytesReceived", "numBytesTransmitted", - "numDroppedPackets", "numL7BytesReceived", - "numL7BytesTransmitted", "numLostPackets", - "numOutOfOrderPackets", "numPacketErrors", - "numPacketsReceivedExclRetrans", - "numPacketsReceivedInclRetrans", - "numPacketsTransmittedInclRetrans", - "numRetries", "numTimeouts", "numTunneledL7BytesReceived", - "roundTripTime", "timeToFirstByte" + "required": [ + "avgBitErrorRate", + "avgPacketDelayVariation", + "avgPacketLatency", + "avgReceiveThroughput", + "avgTransmitThroughput", + "flowActivationEpoch", + "flowActivationMicrosec", + "flowDeactivationEpoch", + "flowDeactivationMicrosec", + "flowDeactivationTime", + "flowStatus", + "maxPacketDelayVariation", + "numActivationFailures", + "numBitErrors", + "numBytesReceived", + "numBytesTransmitted", + "numDroppedPackets", + "numL7BytesReceived", + "numL7BytesTransmitted", + "numLostPackets", + "numOutOfOrderPackets", + "numPacketErrors", + "numPacketsReceivedExclRetrans", + "numPacketsReceivedInclRetrans", + "numPacketsTransmittedInclRetrans", + "numRetries", + "numTimeouts", + "numTunneledL7BytesReceived", + "roundTripTime", + "timeToFirstByte" ] }, "heartbeatFields": { @@ -950,7 +1105,10 @@ "type": "integer" } }, - "required": [ "heartbeatFieldsVersion", "heartbeatInterval" ] + "required": [ + "heartbeatFieldsVersion", + "heartbeatInterval" + ] }, "internalHeaderFields": { "description": "enrichment fields for internal VES Event Listener service use only, not supplied by event sources", @@ -960,86 +1118,101 @@ "description": "json object schema, name and other meta-information along with one or more object instances", "type": "object", "properties": { - "objectInstances": { - "description": "one or more instances of the jsonObject", - "type": "array", - "items": { - "$ref": "#/definitions/jsonObjectInstance" - } - }, - "objectName": { - "description": "name of the JSON Object", - "type": "string" - }, - "objectSchema": { - "description": "json schema for the object", - "type": "string" - }, - "objectSchemaUrl": { - "description": "Url to the json schema for the object", - "type": "string" - }, - "nfSubscribedObjectName": { - "description": "name of the object associated with the nfSubscriptonId", - "type": "string" - }, - "nfSubscriptionId": { - "description": "identifies an openConfig telemetry subscription on a network function, which configures the network function to send complex object data associated with the jsonObject", - "type": "string" - } + "objectInstances": { + "description": "one or more instances of the jsonObject", + "type": "array", + "items": { + "$ref": "#/definitions/jsonObjectInstance" + } + }, + "objectName": { + "description": "name of the JSON Object", + "type": "string" + }, + "objectSchema": { + "description": "json schema for the object", + "type": "string" + }, + "objectSchemaUrl": { + "description": "Url to the json schema for the object", + "type": "string" + }, + "nfSubscribedObjectName": { + "description": "name of the object associated with the nfSubscriptonId", + "type": "string" + }, + "nfSubscriptionId": { + "description": "identifies an openConfig telemetry subscription on a network function, which configures the network function to send complex object data associated with the jsonObject", + "type": "string" + } }, - "required": [ "objectInstances", "objectName" ] + "required": [ + "objectInstances", + "objectName" + ] }, "jsonObjectInstance": { "description": "meta-information about an instance of a jsonObject along with the actual object instance", "type": "object", "properties": { - "objectInstance": { - "description": "an instance conforming to the jsonObject schema", - "type": "object" - }, - "objectInstanceEpochMicrosec": { - "description": "the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds", - "type": "number" - }, - "objectKeys": { - "description": "an ordered set of keys that identifies this particular instance of jsonObject", - "type": "array", - "items": { - "$ref": "#/definitions/key" - } - } + "objectInstance": { + "description": "an instance conforming to the jsonObject schema", + "type": "object" + }, + "objectInstanceEpochMicrosec": { + "description": "the unix time aka epoch time associated with this objectInstance--as microseconds elapsed since 1 Jan 1970 not including leap seconds", + "type": "number" + }, + "objectKeys": { + "description": "an ordered set of keys that identifies this particular instance of jsonObject", + "type": "array", + "items": { + "$ref": "#/definitions/key" + } + } }, - "required": [ "objectInstance" ] + "required": [ + "objectInstance" + ] }, "key": { "description": "tuple which provides the name of a key along with its value and relative order", "type": "object", "properties": { - "keyName": { - "description": "name of the key", - "type": "string" + "keyName": { + "description": "name of the key", + "type": "string" }, - "keyOrder": { - "description": "relative sequence or order of the key with respect to other keys", - "type": "integer" + "keyOrder": { + "description": "relative sequence or order of the key with respect to other keys", + "type": "integer" }, - "keyValue": { - "description": "value of the key", - "type": "string" + "keyValue": { + "description": "value of the key", + "type": "string" } }, - "required": [ "keyName" ] + "required": [ + "keyName" + ] }, "latencyBucketMeasure": { "description": "number of counts falling within a defined latency bucket", "type": "object", "properties": { - "countsInTheBucket": { "type": "number" }, - "highEndOfLatencyBucket": { "type": "number" }, - "lowEndOfLatencyBucket": { "type": "number" } + "countsInTheBucket": { + "type": "number" + }, + "highEndOfLatencyBucket": { + "type": "number" + }, + "lowEndOfLatencyBucket": { + "type": "number" + } }, - "required": [ "countsInTheBucket" ] + "required": [ + "countsInTheBucket" + ] }, "measurementsForVfScalingFields": { "description": "measurementsForVfScaling fields", @@ -1059,13 +1232,13 @@ "$ref": "#/definitions/namedArrayOfFields" } }, - "additionalObjects": { - "description": "array of JSON objects described by name, schema and other meta-information", + "additionalObjects": { + "description": "array of JSON objects described by name, schema and other meta-information", "type": "array", "items": { - "$ref": "#/definitions/jsonObject" + "$ref": "#/definitions/jsonObject" } - }, + }, "codecUsageArray": { "description": "array of codecs in use", "type": "array", @@ -1088,7 +1261,7 @@ "$ref": "#/definitions/cpuUsage" } }, - "diskUsageArray": { + "diskUsageArray": { "description": "usage of an array of disks", "type": "array", "items": { @@ -1155,46 +1328,53 @@ } } }, - "required": [ "measurementInterval", "measurementsForVfScalingVersion" ] + "required": [ + "measurementInterval", + "measurementsForVfScalingVersion" + ] }, "memoryUsage": { "description": "memory usage of an identified virtual machine", "type": "object", "properties": { - "memoryBuffered": { - "description": "kibibytes of temporary storage for raw disk blocks", - "type": "number" - }, - "memoryCached": { - "description": "kibibytes of memory used for cache", - "type": "number" - }, - "memoryConfigured": { - "description": "kibibytes of memory configured in the virtual machine on which the VNFC reporting the event is running", - "type": "number" - }, - "memoryFree": { - "description": "kibibytes of physical RAM left unused by the system", - "type": "number" - }, - "memorySlabRecl": { - "description": "the part of the slab that can be reclaimed such as caches measured in kibibytes", - "type": "number" - }, - "memorySlabUnrecl": { - "description": "the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes", - "type": "number" - }, - "memoryUsed": { - "description": "total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes", - "type": "number" - }, - "vmIdentifier": { - "description": "virtual machine identifier associated with the memory metrics", - "type": "string" - } + "memoryBuffered": { + "description": "kibibytes of temporary storage for raw disk blocks", + "type": "number" + }, + "memoryCached": { + "description": "kibibytes of memory used for cache", + "type": "number" + }, + "memoryConfigured": { + "description": "kibibytes of memory configured in the virtual machine on which the VNFC reporting the event is running", + "type": "number" + }, + "memoryFree": { + "description": "kibibytes of physical RAM left unused by the system", + "type": "number" + }, + "memorySlabRecl": { + "description": "the part of the slab that can be reclaimed such as caches measured in kibibytes", + "type": "number" + }, + "memorySlabUnrecl": { + "description": "the part of the slab that cannot be reclaimed even when lacking memory measured in kibibytes", + "type": "number" + }, + "memoryUsed": { + "description": "total memory minus the sum of free, buffered, cached and slab memory measured in kibibytes", + "type": "number" + }, + "vmIdentifier": { + "description": "virtual machine identifier associated with the memory metrics", + "type": "string" + } }, - "required": [ "memoryFree", "memoryUsed", "vmIdentifier" ] + "required": [ + "memoryFree", + "memoryUsed", + "vmIdentifier" + ] }, "mobileFlowFields": { "description": "mobileFlow fields", @@ -1235,7 +1415,9 @@ "description": "Flow direction, indicating if the reporting node is the source of the flow or destination for the flow", "type": "string" }, - "gtpPerFlowMetrics": { "$ref": "#/definitions/gtpPerFlowMetrics" }, + "gtpPerFlowMetrics": { + "$ref": "#/definitions/gtpPerFlowMetrics" + }, "gtpProtocolType": { "description": "GTP protocol", "type": "string" @@ -1276,10 +1458,10 @@ "description": "mobile network code", "type": "string" }, - "mobileFlowFieldsVersion": { - "description": "version of the mobileFlowFields block", - "type": "number" - }, + "mobileFlowFieldsVersion": { + "description": "version of the mobileFlowFields block", + "type": "number" + }, "msisdn": { "description": "MSISDN for the subscriber UE used in this flow, as an integer, if the flow connects to a mobile device", "type": "string" @@ -1333,24 +1515,37 @@ "type": "string" } }, - "required": [ "flowDirection", "gtpPerFlowMetrics", "ipProtocolType", "ipVersion", - "mobileFlowFieldsVersion", "otherEndpointIpAddress", "otherEndpointPort", - "reportingEndpointIpAddr", "reportingEndpointPort" ] + "required": [ + "flowDirection", + "gtpPerFlowMetrics", + "ipProtocolType", + "ipVersion", + "mobileFlowFieldsVersion", + "otherEndpointIpAddress", + "otherEndpointPort", + "reportingEndpointIpAddr", + "reportingEndpointPort" + ] }, "namedArrayOfFields": { "description": "an array of name value pairs along with a name for the array", "type": "object", "properties": { - "name": { "type": "string" }, + "name": { + "type": "string" + }, "arrayOfFields": { "description": "array of name value pairs", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } } }, - "required": [ "name", "arrayOfFields" ] + "required": [ + "name", + "arrayOfFields" + ] }, "otherFields": { "description": "fields for events belonging to the 'other' domain of the commonEventHeader domain enumeration", @@ -1363,32 +1558,34 @@ "$ref": "#/definitions/namedArrayOfFields" } }, - "jsonObjects": { - "description": "array of JSON objects described by name, schema and other meta-information", + "jsonObjects": { + "description": "array of JSON objects described by name, schema and other meta-information", "type": "array", "items": { - "$ref": "#/definitions/jsonObject" + "$ref": "#/definitions/jsonObject" } - }, + }, "nameValuePairs": { "description": "array of name-value pairs", "type": "array", "items": { "$ref": "#/definitions/field" } - }, - "otherFieldsVersion": { - "description": "version of the otherFields block", - "type": "number" - } - }, - "required": [ "otherFieldsVersion" ] + }, + "otherFieldsVersion": { + "description": "version of the otherFields block", + "type": "number" + } + }, + "required": [ + "otherFieldsVersion" + ] }, "requestError": { "description": "standard request error data structure", "type": "object", "properties": { - "messageId": { + "messageId": { "description": "Unique message identifier of the format ABCnnnn where ABC is either SVC for Service Exceptions or POL for Policy Exception", "type": "string" }, @@ -1405,58 +1602,68 @@ "type": "string" } }, - "required": [ "messageId", "text" ] + "required": [ + "messageId", + "text" + ] }, - "sipSignalingFields": { - "description": "sip signaling fields", - "type": "object", - "properties": { - "additionalInformation": { + "sipSignalingFields": { + "description": "sip signaling fields", + "type": "object", + "properties": { + "additionalInformation": { "description": "additional sip signaling fields if needed", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } - }, - "compressedSip": { - "description": "the full SIP request/response including headers and bodies", - "type": "string" - }, - "correlator": { - "description": "this is the same for all events on this call", - "type": "string" - }, - "localIpAddress": { - "description": "IP address on VNF", - "type": "string" - }, - "localPort": { - "description": "port on VNF", - "type": "string" - }, - "remoteIpAddress": { - "description": "IP address of peer endpoint", - "type": "string" - }, - "remotePort": { - "description": "port of peer endpoint", - "type": "string" - }, - "sipSignalingFieldsVersion": { - "description": "version of the sipSignalingFields block", - "type": "number" - }, - "summarySip": { - "description": "the SIP Method or Response (‘INVITE’, ‘200 OK’, ‘BYE’, etc)", - "type": "string" - }, - "vendorVnfNameFields": { - "$ref": "#/definitions/vendorVnfNameFields" - } - }, - "required": [ "correlator", "localIpAddress", "localPort", "remoteIpAddress", - "remotePort", "sipSignalingFieldsVersion", "vendorVnfNameFields" ] - }, + }, + "compressedSip": { + "description": "the full SIP request/response including headers and bodies", + "type": "string" + }, + "correlator": { + "description": "this is the same for all events on this call", + "type": "string" + }, + "localIpAddress": { + "description": "IP address on VNF", + "type": "string" + }, + "localPort": { + "description": "port on VNF", + "type": "string" + }, + "remoteIpAddress": { + "description": "IP address of peer endpoint", + "type": "string" + }, + "remotePort": { + "description": "port of peer endpoint", + "type": "string" + }, + "sipSignalingFieldsVersion": { + "description": "version of the sipSignalingFields block", + "type": "number" + }, + "summarySip": { + "description": "the SIP Method or Response (‘INVITE’, ‘200 OK’, ‘BYE’, etc)", + "type": "string" + }, + "vendorVnfNameFields": { + "$ref": "#/definitions/vendorVnfNameFields" + } + }, + "required": [ + "correlator", + "localIpAddress", + "localPort", + "remoteIpAddress", + "remotePort", + "sipSignalingFieldsVersion", + "vendorVnfNameFields" + ] + }, "stateChangeFields": { "description": "stateChange fields", "type": "object", @@ -1495,7 +1702,12 @@ "type": "string" } }, - "required": [ "newState", "oldState", "stateChangeFieldsVersion", "stateInterface" ] + "required": [ + "newState", + "oldState", + "stateChangeFieldsVersion", + "stateInterface" + ] }, "suppressedNvPairs": { "description": "List of specific NvPairsNames to suppress within a given Name-Value Field for event Throttling", @@ -1507,13 +1719,16 @@ }, "suppressedNvPairNames": { "description": "Array of nvpair names to suppress within the nvpairFieldName", - "type": "array", + "type": "array", "items": { - "type": "string" + "type": "string" } } }, - "required": [ "nvPairFieldName", "suppressedNvPairNames" ] + "required": [ + "nvPairFieldName", + "suppressedNvPairNames" + ] }, "syslogFields": { "description": "sysLog fields", @@ -1586,7 +1801,12 @@ "type": "number" } }, - "required": [ "eventSourceType", "syslogFieldsVersion", "syslogMsg", "syslogTag" ] + "required": [ + "eventSourceType", + "syslogFieldsVersion", + "syslogMsg", + "syslogTag" + ] }, "thresholdCrossingAlertFields": { "description": "fields specific to threshold crossing alert events", @@ -1595,8 +1815,8 @@ "additionalFields": { "description": "additional threshold crossing alert fields if needed", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } }, "additionalParameters": { @@ -1636,7 +1856,9 @@ "associatedAlertIdList": { "description": "List of eventIds associated with the event being reported", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "collectionTimestamp": { "description": "Time when the performance collector picked up the data; with RFC 2822 compliant format: Sat, 13 Mar 2010 11:29:05 -0800", @@ -1710,7 +1932,9 @@ "type": "string" } }, - "required": [ "vendorName" ] + "required": [ + "vendorName" + ] }, "vNicPerformance": { "description": "describes the performance and errors of an identified virtual network interface card", @@ -1831,59 +2055,71 @@ "valuesAreSuspect": { "description": "Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other condtions", "type": "string", - "enum": [ "true", "false" ] + "enum": [ + "true", + "false" + ] }, "vNicIdentifier": { "description": "vNic identification", "type": "string" } }, - "required": [ "valuesAreSuspect", "vNicIdentifier" ] + "required": [ + "valuesAreSuspect", + "vNicIdentifier" + ] }, - "voiceQualityFields": { - "description": "provides statistics related to customer facing voice products", - "type": "object", - "properties": { - "additionalInformation": { + "voiceQualityFields": { + "description": "provides statistics related to customer facing voice products", + "type": "object", + "properties": { + "additionalInformation": { "description": "additional voice quality fields if needed", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } - }, - "calleeSideCodec": { - "description": "callee codec for the call", - "type": "string" - }, - "callerSideCodec": { - "description": "caller codec for the call", - "type": "string" - }, - "correlator": { - "description": "this is the same for all events on this call", - "type": "string" - }, - "endOfCallVqmSummaries": { - "$ref": "#/definitions/endOfCallVqmSummaries" - }, - "phoneNumber": { - "description": "phone number associated with the correlator", - "type": "string" - }, - "midCallRtcp": { - "description": "Base64 encoding of the binary RTCP data excluding Eth/IP/UDP headers", - "type": "string" - }, - "vendorVnfNameFields": { - "$ref": "#/definitions/vendorVnfNameFields" - }, - "voiceQualityFieldsVersion": { - "description": "version of the voiceQualityFields block", - "type": "number" - } - }, - "required": [ "calleeSideCodec", "callerSideCodec", "correlator", "midCallRtcp", - "vendorVnfNameFields", "voiceQualityFieldsVersion" ] - } + }, + "calleeSideCodec": { + "description": "callee codec for the call", + "type": "string" + }, + "callerSideCodec": { + "description": "caller codec for the call", + "type": "string" + }, + "correlator": { + "description": "this is the same for all events on this call", + "type": "string" + }, + "endOfCallVqmSummaries": { + "$ref": "#/definitions/endOfCallVqmSummaries" + }, + "phoneNumber": { + "description": "phone number associated with the correlator", + "type": "string" + }, + "midCallRtcp": { + "description": "Base64 encoding of the binary RTCP data excluding Eth/IP/UDP headers", + "type": "string" + }, + "vendorVnfNameFields": { + "$ref": "#/definitions/vendorVnfNameFields" + }, + "voiceQualityFieldsVersion": { + "description": "version of the voiceQualityFields block", + "type": "number" + } + }, + "required": [ + "calleeSideCodec", + "callerSideCodec", + "correlator", + "midCallRtcp", + "vendorVnfNameFields", + "voiceQualityFieldsVersion" + ] + } } } diff --git a/etc/CommonEventFormat_Vendors_v25.json b/etc/CommonEventFormat_Vendors_v25.json index 0c765302..7e81e387 100755 --- a/etc/CommonEventFormat_Vendors_v25.json +++ b/etc/CommonEventFormat_Vendors_v25.json @@ -1,8 +1,7 @@ {
- "$schema": "http://json-schema.org/draft-04/schema#",
-
+ "$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
-"attCopyrightNotice": {
+ "attCopyrightNotice": {
"description": "Copyright (c) <2017>, AT&T Intellectual Property. All rights reserved. Licensed under the Apache License, Version 2.0 (the License)",
"type": "object",
"properties": {
@@ -11,8 +10,8 @@ "type": "string"
},
"licenseLink": {
- "description": "http://www.apache.org/licenses/LICENSE-2.0",
- "type":"string"
+ "description": "http://www.apache.org/licenses/LICENSE-2.0",
+ "type": "string"
},
"condition1": {
"description": "Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an AS IS BASIS,",
@@ -35,38 +34,51 @@ "type": "string"
}
}
- },
- "codecsInUse": {
+ },
+ "codecsInUse": {
"description": "number of times an identified codec was used over the measurementInterval",
"type": "object",
"properties": {
- "codecIdentifier": { "type": "string" },
- "numberInUse": { "type": "number" }
+ "codecIdentifier": {
+ "type": "string"
+ },
+ "numberInUse": {
+ "type": "number"
+ }
},
- "required": [ "codecIdentifier", "codecUtilization" ]
+ "required": [
+ "codecIdentifier",
+ "codecUtilization"
+ ]
},
- "command": {
+ "command": {
"description": "command from an event collector toward an event source",
"type": "object",
"properties": {
- "commandType": {
- "type": "string",
+ "commandType": {
+ "type": "string",
"enum": [
"measurementIntervalChange",
"provideThrottlingState",
"throttlingSpecification"
]
},
- "eventDomainThrottleSpecification": { "$ref": "#/definitions/eventDomainThrottleSpecification" },
- "measurementInterval": { "type": "number" }
+ "eventDomainThrottleSpecification": {
+ "$ref": "#/definitions/eventDomainThrottleSpecification"
+ },
+ "measurementInterval": {
+ "type": "number"
+ }
},
- "required": [ "commandType" ]
+ "required": [
+ "commandType"
+ ]
},
"commandList": {
"description": "array of commands from an event collector toward an event source",
"type": "array",
- "items": {
- "$ref": "#/definitions/command"
+ "items": {
+ "$ref": "#/definitions/command"
},
"minItems": 0
},
@@ -143,111 +155,180 @@ "type": "number"
}
},
- "required": [ "domain", "eventId", "functionalRole", "lastEpochMicrosec",
- "priority", "reportingEntityName", "sequence",
- "sourceName", "startEpochMicrosec" ]
+ "required": [
+ "domain",
+ "eventId",
+ "functionalRole",
+ "lastEpochMicrosec",
+ "priority",
+ "reportingEntityName",
+ "sequence",
+ "sourceName",
+ "startEpochMicrosec"
+ ]
},
"counter": {
"description": "performance counter",
"type": "object",
"properties": {
- "criticality": { "type": "string", "enum": [ "CRIT", "MAJ" ] },
- "name": { "type": "string" },
- "thresholdCrossed": { "type": "string" },
- "value": { "type": "string"}
+ "criticality": {
+ "type": "string",
+ "enum": [
+ "CRIT",
+ "MAJ"
+ ]
+ },
+ "name": {
+ "type": "string"
+ },
+ "thresholdCrossed": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
},
- "required": [ "criticality", "name", "thresholdCrossed", "value" ]
+ "required": [
+ "criticality",
+ "name",
+ "thresholdCrossed",
+ "value"
+ ]
},
"cpuUsage": {
"description": "percent usage of an identified CPU",
"type": "object",
"properties": {
- "cpuIdentifier": { "type": "string" },
- "percentUsage": { "type": "number" }
+ "cpuIdentifier": {
+ "type": "string"
+ },
+ "percentUsage": {
+ "type": "number"
+ }
},
- "required": [ "cpuIdentifier", "percentUsage" ]
+ "required": [
+ "cpuIdentifier",
+ "percentUsage"
+ ]
},
"errors": {
"description": "receive and transmit errors for the measurements domain",
"type": "object",
"properties": {
- "receiveDiscards": { "type": "number" },
- "receiveErrors": { "type": "number" },
- "transmitDiscards": { "type": "number" },
- "transmitErrors": { "type": "number" }
+ "receiveDiscards": {
+ "type": "number"
+ },
+ "receiveErrors": {
+ "type": "number"
+ },
+ "transmitDiscards": {
+ "type": "number"
+ },
+ "transmitErrors": {
+ "type": "number"
+ }
+ },
+ "required": [
+ "receiveDiscards",
+ "receiveErrors",
+ "transmitDiscards",
+ "transmitErrors"
+ ]
+ },
+ "event": {
+ "description": "generic event format",
+ "type": "object",
+ "properties": {
+ "commonEventHeader": {
+ "$ref": "#/definitions/commonEventHeader"
+ },
+ "faultFields": {
+ "$ref": "#/definitions/faultFields"
+ },
+ "measurementsForVfScalingFields": {
+ "$ref": "#/definitions/measurementsForVfScalingFields"
+ },
+ "mobileFlowFields": {
+ "$ref": "#/definitions/mobileFlowFields"
+ },
+ "otherFields": {
+ "$ref": "#/definitions/otherFields"
+ },
+ "stateChangeFields": {
+ "$ref": "#/definitions/stateChangeFields"
+ },
+ "syslogFields": {
+ "$ref": "#/definitions/syslogFields"
+ },
+ "thresholdCrossingAlertFields": {
+ "$ref": "#/definitions/thresholdCrossingAlertFields"
+ }
},
- "required": [ "receiveDiscards", "receiveErrors", "transmitDiscards", "transmitErrors" ]
+ "required": [
+ "commonEventHeader"
+ ]
},
- "event": {
- "description": "generic event format",
- "type": "object",
- "properties": {
- "commonEventHeader": { "$ref": "#/definitions/commonEventHeader" },
- "faultFields": { "$ref": "#/definitions/faultFields" },
- "measurementsForVfScalingFields": { "$ref": "#/definitions/measurementsForVfScalingFields" },
- "mobileFlowFields": { "$ref": "#/definitions/mobileFlowFields" },
- "otherFields": { "$ref": "#/definitions/otherFields" },
- "stateChangeFields": { "$ref": "#/definitions/stateChangeFields" },
- "syslogFields": { "$ref": "#/definitions/syslogFields" },
- "thresholdCrossingAlertFields": { "$ref": "#/definitions/thresholdCrossingAlertFields" }
- },
- "required": [ "commonEventHeader" ]
- },
"eventDomainThrottleSpecification": {
"description": "specification of what information to suppress within an event domain",
"type": "object",
- "properties": {
- "eventDomain": {
- "description": "Event domain enum from the commonEventHeader domain field",
- "type": "string"
- },
- "suppressedFieldNames": {
- "description": "List of optional field names in the event block that should not be sent to the Event Listener",
- "type": "array",
+ "properties": {
+ "eventDomain": {
+ "description": "Event domain enum from the commonEventHeader domain field",
+ "type": "string"
+ },
+ "suppressedFieldNames": {
+ "description": "List of optional field names in the event block that should not be sent to the Event Listener",
+ "type": "array",
"items": {
- "type": "string"
+ "type": "string"
}
- },
+ },
"suppressedNvPairsList": {
"description": "Optional list of specific NvPairsNames to suppress within a given Name-Value Field",
- "type": "array",
+ "type": "array",
"items": {
- "$ref": "#/definitions/suppressedNvPairs"
+ "$ref": "#/definitions/suppressedNvPairs"
}
- }
+ }
},
- "required": [ "eventDomain" ]
+ "required": [
+ "eventDomain"
+ ]
},
"eventDomainThrottleSpecificationList": {
"description": "array of eventDomainThrottleSpecifications",
"type": "array",
- "items": {
- "$ref": "#/definitions/eventDomainThrottleSpecification"
+ "items": {
+ "$ref": "#/definitions/eventDomainThrottleSpecification"
},
"minItems": 0
},
"eventList": {
"description": "array of events",
"type": "array",
- "items": {
- "$ref": "#/definitions/event"
+ "items": {
+ "$ref": "#/definitions/event"
}
},
"eventThrottlingState": {
"description": "reports the throttling in force at the event source",
"type": "object",
- "properties": {
- "eventThrottlingMode": {
- "description": "Mode the event manager is in",
- "type": "string",
+ "properties": {
+ "eventThrottlingMode": {
+ "description": "Mode the event manager is in",
+ "type": "string",
"enum": [
"normal",
"throttled"
]
- },
- "eventDomainThrottleSpecificationList": { "$ref": "#/definitions/eventDomainThrottleSpecificationList" }
+ },
+ "eventDomainThrottleSpecificationList": {
+ "$ref": "#/definitions/eventDomainThrottleSpecificationList"
+ }
},
- "required": [ "eventThrottlingMode" ]
+ "required": [
+ "eventThrottlingMode"
+ ]
},
"faultFields": {
"description": "fields specific to fault events",
@@ -303,41 +384,81 @@ ]
}
},
- "required": [ "alarmCondition", "eventSeverity",
- "eventSourceType", "specificProblem", "vfStatus" ]
+ "required": [
+ "alarmCondition",
+ "eventSeverity",
+ "eventSourceType",
+ "specificProblem",
+ "vfStatus"
+ ]
},
"featuresInUse": {
"description": "number of times an identified feature was used over the measurementInterval",
"type": "object",
"properties": {
- "featureIdentifier": { "type": "string" },
- "featureUtilization": { "type": "number" }
+ "featureIdentifier": {
+ "type": "string"
+ },
+ "featureUtilization": {
+ "type": "number"
+ }
},
- "required": [ "featureIdentifier", "featureUtilization" ]
+ "required": [
+ "featureIdentifier",
+ "featureUtilization"
+ ]
},
"field": {
"description": "name value pair",
"type": "object",
"properties": {
- "name": { "type": "string" },
- "value": { "type": "string" }
+ "name": {
+ "type": "string"
+ },
+ "value": {
+ "type": "string"
+ }
},
- "required": [ "name", "value" ]
+ "required": [
+ "name",
+ "value"
+ ]
},
"filesystemUsage": {
"description": "disk usage of an identified virtual machine in gigabytes and/or gigabytes per second",
"type": "object",
"properties": {
- "blockConfigured": { "type": "number" },
- "blockIops": { "type": "number" },
- "blockUsed": { "type": "number" },
- "ephemeralConfigured": { "type": "number" },
- "ephemeralIops": { "type": "number" },
- "ephemeralUsed": { "type": "number" },
- "filesystemName": { "type": "string" }
+ "blockConfigured": {
+ "type": "number"
+ },
+ "blockIops": {
+ "type": "number"
+ },
+ "blockUsed": {
+ "type": "number"
+ },
+ "ephemeralConfigured": {
+ "type": "number"
+ },
+ "ephemeralIops": {
+ "type": "number"
+ },
+ "ephemeralUsed": {
+ "type": "number"
+ },
+ "filesystemName": {
+ "type": "string"
+ }
},
- "required": [ "blockConfigured", "blockIops", "blockUsed", "ephemeralConfigured",
- "ephemeralIops", "ephemeralUsed", "filesystemName" ]
+ "required": [
+ "blockConfigured",
+ "blockIops",
+ "blockUsed",
+ "ephemeralConfigured",
+ "ephemeralIops",
+ "ephemeralUsed",
+ "filesystemName"
+ ]
},
"gtpPerFlowMetrics": {
"description": "Mobility GTP Protocol per flow metrics",
@@ -417,22 +538,26 @@ },
"ipTosCountList": {
"description": "array of key: value pairs where the keys are drawn from the IP Type-of-Service identifiers which range from '0' to '255', and the values are the count of packets that had those ToS identifiers in the flow",
- "type": "array",
- "uniqueItems": true,
- "items": {
- "type": "array",
- "items": [
- { "type": "string" },
- { "type": "number" }
- ],
- "additionalItems": false
- }
+ "type": "array",
+ "uniqueItems": true,
+ "items": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "additionalItems": false
+ }
},
"ipTosList": {
"description": "Array of unique IP Type-of-Service values observed in the flow where values range from '0' to '255'",
"type": "array",
- "items": {
- "type": "string"
+ "items": {
+ "type": "string"
}
},
"largePacketRtt": {
@@ -457,22 +582,26 @@ },
"mobileQciCosCountList": {
"description": "array of key: value pairs where the keys are drawn from LTE QCI or UMTS class of service strings, and the values are the count of packets that had those strings in the flow",
- "type": "array",
- "uniqueItems": true,
- "items": {
- "type": "array",
- "items": [
- { "type": "string" },
- { "type": "number" }
- ],
- "additionalItems": false
- }
+ "type": "array",
+ "uniqueItems": true,
+ "items": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "additionalItems": false
+ }
},
"mobileQciCosList": {
"description": "Array of unique LTE QCI or UMTS class-of-service values observed in the flow",
"type": "array",
- "items": {
- "type": "string"
+ "items": {
+ "type": "string"
}
},
"numActivationFailures": {
@@ -557,22 +686,26 @@ },
"tcpFlagCountList": {
"description": "array of key: value pairs where the keys are drawn from TCP Flags and the values are the count of packets that had that TCP Flag in the flow",
- "type": "array",
- "uniqueItems": true,
- "items": {
- "type": "array",
- "items": [
- { "type": "string" },
- { "type": "number" }
- ],
- "additionalItems": false
- }
+ "type": "array",
+ "uniqueItems": true,
+ "items": {
+ "type": "array",
+ "items": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ }
+ ],
+ "additionalItems": false
+ }
},
"tcpFlagList": {
"description": "Array of unique TCP Flags observed in the flow",
"type": "array",
- "items": {
- "type": "string"
+ "items": {
+ "type": "string"
}
},
"timeToFirstByte": {
@@ -580,47 +713,76 @@ "type": "number"
}
},
- "required": [ "avgBitErrorRate", "avgPacketDelayVariation", "avgPacketLatency",
- "avgReceiveThroughput", "avgTransmitThroughput",
- "flowActivationEpoch", "flowActivationMicrosec",
- "flowDeactivationEpoch", "flowDeactivationMicrosec",
- "flowDeactivationTime", "flowStatus",
- "maxPacketDelayVariation", "numActivationFailures",
- "numBitErrors", "numBytesReceived", "numBytesTransmitted",
- "numDroppedPackets", "numL7BytesReceived",
- "numL7BytesTransmitted", "numLostPackets",
- "numOutOfOrderPackets", "numPacketErrors",
- "numPacketsReceivedExclRetrans",
- "numPacketsReceivedInclRetrans",
- "numPacketsTransmittedInclRetrans",
- "numRetries", "numTimeouts", "numTunneledL7BytesReceived",
- "roundTripTime", "timeToFirstByte"
+ "required": [
+ "avgBitErrorRate",
+ "avgPacketDelayVariation",
+ "avgPacketLatency",
+ "avgReceiveThroughput",
+ "avgTransmitThroughput",
+ "flowActivationEpoch",
+ "flowActivationMicrosec",
+ "flowDeactivationEpoch",
+ "flowDeactivationMicrosec",
+ "flowDeactivationTime",
+ "flowStatus",
+ "maxPacketDelayVariation",
+ "numActivationFailures",
+ "numBitErrors",
+ "numBytesReceived",
+ "numBytesTransmitted",
+ "numDroppedPackets",
+ "numL7BytesReceived",
+ "numL7BytesTransmitted",
+ "numLostPackets",
+ "numOutOfOrderPackets",
+ "numPacketErrors",
+ "numPacketsReceivedExclRetrans",
+ "numPacketsReceivedInclRetrans",
+ "numPacketsTransmittedInclRetrans",
+ "numRetries",
+ "numTimeouts",
+ "numTunneledL7BytesReceived",
+ "roundTripTime",
+ "timeToFirstByte"
]
},
"latencyBucketMeasure": {
"description": "number of counts falling within a defined latency bucket",
"type": "object",
"properties": {
- "countsInTheBucket": { "type": "number" },
- "highEndOfLatencyBucket": { "type": "number" },
- "lowEndOfLatencyBucket": { "type": "number" }
+ "countsInTheBucket": {
+ "type": "number"
+ },
+ "highEndOfLatencyBucket": {
+ "type": "number"
+ },
+ "lowEndOfLatencyBucket": {
+ "type": "number"
+ }
},
- "required": [ "countsInTheBucket" ]
+ "required": [
+ "countsInTheBucket"
+ ]
},
"measurementGroup": {
"description": "measurement group",
"type": "object",
"properties": {
- "name": { "type": "string" },
+ "name": {
+ "type": "string"
+ },
"measurements": {
"description": "array of name value pair measurements",
"type": "array",
- "items": {
- "$ref": "#/definitions/field"
+ "items": {
+ "$ref": "#/definitions/field"
}
}
},
- "required": [ "name", "measurements" ]
+ "required": [
+ "name",
+ "measurements"
+ ]
},
"measurementsForVfScalingFields": {
"description": "measurementsForVfScaling fields",
@@ -629,28 +791,28 @@ "additionalMeasurements": {
"description": "additional measurement fields",
"type": "array",
- "items": {
- "$ref": "#/definitions/measurementGroup"
+ "items": {
+ "$ref": "#/definitions/measurementGroup"
}
},
- "aggregateCpuUsage": {
+ "aggregateCpuUsage": {
"description": "aggregate CPU usage of the VM on which the VNFC reporting the event is running",
- "type": "number"
+ "type": "number"
},
"codecUsageArray": {
"description": "array of codecs in use",
"type": "array",
- "items": {
- "$ref": "#/definitions/codecsInUse"
+ "items": {
+ "$ref": "#/definitions/codecsInUse"
}
},
- "concurrentSessions": {
+ "concurrentSessions": {
"description": "peak concurrent sessions for the VM or VNF over the measurementInterval",
- "type": "number"
+ "type": "number"
},
- "configuredEntities": {
+ "configuredEntities": {
"description": "over the measurementInterval, peak total number of: users, subscribers, devices, adjacencies, etc., for the VM, or subscribers, devices, etc., for the VNF",
- "type": "number"
+ "type": "number"
},
"cpuUsageArray": {
"description": "usage of an array of CPUs",
@@ -659,31 +821,33 @@ "$ref": "#/definitions/cpuUsage"
}
},
- "errors": { "$ref": "#/definitions/errors" },
+ "errors": {
+ "$ref": "#/definitions/errors"
+ },
"featureUsageArray": {
"description": "array of features in use",
"type": "array",
- "items": {
- "$ref": "#/definitions/featuresInUse"
+ "items": {
+ "$ref": "#/definitions/featuresInUse"
}
},
"filesystemUsageArray": {
"description": "filesystem usage of the VM on which the VNFC reporting the event is running",
"type": "array",
- "items": {
- "$ref": "#/definitions/filesystemUsage"
+ "items": {
+ "$ref": "#/definitions/filesystemUsage"
}
},
- "latencyDistribution": {
+ "latencyDistribution": {
"description": "array of integers representing counts of requests whose latency in milliseconds falls within per-VNF configured ranges",
"type": "array",
- "items": {
- "$ref": "#/definitions/latencyBucketMeasure"
+ "items": {
+ "$ref": "#/definitions/latencyBucketMeasure"
}
},
- "meanRequestLatency": {
+ "meanRequestLatency": {
"description": "mean seconds required to respond to each request for the VM on which the VNFC reporting the event is running",
- "type": "number"
+ "type": "number"
},
"measurementInterval": {
"description": "interval over which measurements are being reported in seconds",
@@ -693,7 +857,7 @@ "description": "version of the measurementsForVfScaling block",
"type": "number"
},
- "memoryConfigured": {
+ "memoryConfigured": {
"description": "memory configured in the VM on which the VNFC reporting the event is running",
"type": "number"
},
@@ -705,9 +869,9 @@ "description": "number of media ports in use",
"type": "number"
},
- "requestRate": {
+ "requestRate": {
"description": "peak rate of service requests per second to the VNF over the measurementInterval",
- "type": "number"
+ "type": "number"
},
"vnfcScalingMetric": {
"description": "represents busy-ness of the VNF from 0 to 100 as reported by the VNFC",
@@ -716,12 +880,14 @@ "vNicUsageArray": {
"description": "usage of an array of virtual network interface cards",
"type": "array",
- "items": {
- "$ref": "#/definitions/vNicUsage"
+ "items": {
+ "$ref": "#/definitions/vNicUsage"
}
}
},
- "required": [ "measurementInterval" ]
+ "required": [
+ "measurementInterval"
+ ]
},
"mobileFlowFields": {
"description": "mobileFlow fields",
@@ -755,7 +921,9 @@ "description": "Flow direction, indicating if the reporting node is the source of the flow or destination for the flow",
"type": "string"
},
- "gtpPerFlowMetrics": { "$ref": "#/definitions/gtpPerFlowMetrics" },
+ "gtpPerFlowMetrics": {
+ "$ref": "#/definitions/gtpPerFlowMetrics"
+ },
"gtpProtocolType": {
"description": "GTP protocol",
"type": "string"
@@ -849,22 +1017,29 @@ "type": "string"
}
},
- "required": [ "flowDirection", "gtpPerFlowMetrics", "ipProtocolType",
- "ipVersion", "otherEndpointIpAddress", "otherEndpointPort",
- "reportingEndpointIpAddr", "reportingEndpointPort" ]
+ "required": [
+ "flowDirection",
+ "gtpPerFlowMetrics",
+ "ipProtocolType",
+ "ipVersion",
+ "otherEndpointIpAddress",
+ "otherEndpointPort",
+ "reportingEndpointIpAddr",
+ "reportingEndpointPort"
+ ]
},
"otherFields": {
"description": "additional fields not reported elsewhere",
"type": "array",
- "items": {
- "$ref": "#/definitions/field"
+ "items": {
+ "$ref": "#/definitions/field"
}
},
"requestError": {
"description": "standard request error data structure",
"type": "object",
- "properties": {
- "messageId": {
+ "properties": {
+ "messageId": {
"description": "Unique message identifier of the format ‘ABCnnnn’ where ‘ABC’ is either ‘SVC’ for Service Exceptions or ‘POL’ for Policy Exception",
"type": "string"
},
@@ -881,7 +1056,10 @@ "type": "string"
}
},
- "required": [ "messageId", "text" ]
+ "required": [
+ "messageId",
+ "text"
+ ]
},
"stateChangeFields": {
"description": "stateChange fields",
@@ -890,14 +1068,14 @@ "additionalFields": {
"description": "additional stateChange fields if needed",
"type": "array",
- "items": {
- "$ref": "#/definitions/field"
+ "items": {
+ "$ref": "#/definitions/field"
}
},
"newState": {
"description": "new state of the entity",
"type": "string",
- "enum": [
+ "enum": [
"inService",
"maintenance",
"outOfService"
@@ -906,7 +1084,7 @@ "oldState": {
"description": "previous state of the entity",
"type": "string",
- "enum": [
+ "enum": [
"inService",
"maintenance",
"outOfService"
@@ -921,7 +1099,11 @@ "type": "string"
}
},
- "required": [ "newState", "oldState", "stateInterface" ]
+ "required": [
+ "newState",
+ "oldState",
+ "stateInterface"
+ ]
},
"suppressedNvPairs": {
"description": "List of specific NvPairsNames to suppress within a given Name-Value Field for event Throttling",
@@ -933,13 +1115,16 @@ },
"suppressedNvPairNames": {
"description": "Array of nvpair names to suppress within the nvpairFieldName",
- "type": "array",
+ "type": "array",
"items": {
- "type": "string"
+ "type": "string"
}
}
},
- "required": [ "nvPairFieldName", "suppressedNvPairNames" ]
+ "required": [
+ "nvPairFieldName",
+ "suppressedNvPairNames"
+ ]
},
"syslogFields": {
"description": "sysLog fields",
@@ -948,8 +1133,8 @@ "additionalFields": {
"description": "additional syslog fields if needed",
"type": "array",
- "items": {
- "$ref": "#/definitions/field"
+ "items": {
+ "$ref": "#/definitions/field"
}
},
"eventSourceHost": {
@@ -993,7 +1178,11 @@ "type": "number"
}
},
- "required": [ "eventSourceType", "syslogMsg", "syslogTag" ]
+ "required": [
+ "eventSourceType",
+ "syslogMsg",
+ "syslogTag"
+ ]
},
"thresholdCrossingAlertFields": {
"description": "fields specific to threshold crossing alert events",
@@ -1002,8 +1191,8 @@ "additionalParameters": {
"description": "performance counters",
"type": "array",
- "items": {
- "$ref": "#/definitions/counter"
+ "items": {
+ "$ref": "#/definitions/counter"
}
},
"alertAction": {
@@ -1036,7 +1225,9 @@ "associatedAlertIdList": {
"description": "List of eventIds associated with the event being reported",
"type": "array",
- "items": { "type": "string" }
+ "items": {
+ "type": "string"
+ }
},
"collectionTimestamp": {
"description": "Time when the performance collector picked up the data; with RFC 2822 compliant format: ‘Sat, 13 Mar 2010 11:29:05 -0800’",
@@ -1081,7 +1272,7 @@ "description": "version of the thresholdCrossingAlertFields block",
"type": "number"
}
- },
+ },
"required": [
"additionalParameters",
"alertAction",
@@ -1096,25 +1287,57 @@ "description": "usage of identified virtual network interface card",
"type": "object",
"properties": {
- "broadcastPacketsIn": { "type": "number" },
- "broadcastPacketsOut": { "type": "number" },
- "bytesIn": { "type": "number" },
- "bytesOut": { "type": "number" },
- "multicastPacketsIn": { "type": "number" },
- "multicastPacketsOut": { "type": "number" },
- "packetsIn": { "type": "number" },
- "packetsOut": { "type": "number" },
- "unicastPacketsIn": { "type": "number" },
- "unicastPacketsOut": { "type": "number" },
- "vNicIdentifier": { "type": "string" }
+ "broadcastPacketsIn": {
+ "type": "number"
+ },
+ "broadcastPacketsOut": {
+ "type": "number"
+ },
+ "bytesIn": {
+ "type": "number"
+ },
+ "bytesOut": {
+ "type": "number"
+ },
+ "multicastPacketsIn": {
+ "type": "number"
+ },
+ "multicastPacketsOut": {
+ "type": "number"
+ },
+ "packetsIn": {
+ "type": "number"
+ },
+ "packetsOut": {
+ "type": "number"
+ },
+ "unicastPacketsIn": {
+ "type": "number"
+ },
+ "unicastPacketsOut": {
+ "type": "number"
+ },
+ "vNicIdentifier": {
+ "type": "string"
+ }
},
- "required": [ "bytesIn", "bytesOut", "packetsIn", "packetsOut", "vNicIdentifier"]
- }
+ "required": [
+ "bytesIn",
+ "bytesOut",
+ "packetsIn",
+ "packetsOut",
+ "vNicIdentifier"
+ ]
+ }
},
"title": "Event Listener",
- "type": "object",
- "properties": {
- "event": {"$ref": "#/definitions/event"}
- },
- "required": ["event"]
+ "type": "object",
+ "properties": {
+ "event": {
+ "$ref": "#/definitions/event"
+ }
+ },
+ "required": [
+ "event"
+ ]
}
\ No newline at end of file diff --git a/etc/CommonEventFormat_Vendors_v26.0.json b/etc/CommonEventFormat_Vendors_v26.0.json index 5db87dc9..b1497f7e 100755 --- a/etc/CommonEventFormat_Vendors_v26.0.json +++ b/etc/CommonEventFormat_Vendors_v26.0.json @@ -1,8 +1,7 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - + "$schema": "http://json-schema.org/draft-04/schema#", "definitions": { - "attCopyrightNotice": { + "attCopyrightNotice": { "description": "Copyright (c) <2017>, AT&T Intellectual Property. All rights reserved. Licensed under the Apache License, Version 2.0 (the License)", "type": "object", "properties": { @@ -11,8 +10,8 @@ "type": "string" }, "licenseLink": { - "description": "http://www.apache.org/licenses/LICENSE-2.0", - "type":"string" + "description": "http://www.apache.org/licenses/LICENSE-2.0", + "type": "string" }, "condition1": { "description": "Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an AS IS BASIS,", @@ -36,32 +35,44 @@ } } }, - - "codecsInUse": { + "codecsInUse": { "description": "number of times an identified codec was used over the measurementInterval", "type": "object", "properties": { - "codecIdentifier": { "type": "string" }, - "numberInUse": { "type": "number" } + "codecIdentifier": { + "type": "string" + }, + "numberInUse": { + "type": "number" + } }, - "required": [ "codecIdentifier", "numberInUse" ] + "required": [ + "codecIdentifier", + "numberInUse" + ] }, - "codecSelected": { - "description": "codec selected for the call - 'PCMA', 'G729A', ...", + "codecSelected": { + "description": "codec selected for the call - 'PCMA', 'G729A', ...", "type": "object", "properties": { - "codec": { "type": "string" } + "codec": { + "type": "string" + } } - }, - "codecSelectedTranscoding": { - "description": "codecs selected for the call, when transcoding is occurring", + }, + "codecSelectedTranscoding": { + "description": "codecs selected for the call, when transcoding is occurring", "type": "object", "properties": { - "calleeSideCodec": { "type": "string" }, - "callerSideCodec": { "type": "string" } + "calleeSideCodec": { + "type": "string" + }, + "callerSideCodec": { + "type": "string" + } } - }, - "command": { + }, + "command": { "description": "command from an event collector toward an event source", "type": "object", "properties": { @@ -73,26 +84,36 @@ "throttlingSpecification" ] }, - "eventDomainThrottleSpecification": { "$ref": "#/definitions/eventDomainThrottleSpecification" }, - "measurementInterval": { "type": "number" } + "eventDomainThrottleSpecification": { + "$ref": "#/definitions/eventDomainThrottleSpecification" + }, + "measurementInterval": { + "type": "number" + } }, - "required": [ "commandType" ] + "required": [ + "commandType" + ] }, "commandList": { "description": "array of commands from an event collector toward an event source", "type": "array", "items": { - "$ref": "#/definitions/commandListEntry" + "$ref": "#/definitions/commandListEntry" }, "minItems": 0 }, - "commandListEntry": { + "commandListEntry": { "description": "reference to a command object", "type": "object", "properties": { - "command": {"$ref": "#/definitions/command"} + "command": { + "$ref": "#/definitions/command" + } }, - "required": [ "command" ] + "required": [ + "command" + ] }, "commonEventHeader": { "description": "fields common to all events", @@ -108,7 +129,7 @@ "mobileFlow", "other", "serviceEvents", - "signaling", + "signaling", "stateChange", "syslog", "thresholdCrossingAlert" @@ -169,179 +190,251 @@ "type": "number" } }, - "required": [ "domain", "eventId", "functionalRole", "lastEpochMicrosec", - "priority", "reportingEntityName", "sequence", - "sourceName", "startEpochMicrosec" ] + "required": [ + "domain", + "eventId", + "functionalRole", + "lastEpochMicrosec", + "priority", + "reportingEntityName", + "sequence", + "sourceName", + "startEpochMicrosec" + ] }, "counter": { "description": "performance counter", "type": "object", "properties": { - "criticality": { "type": "string", "enum": [ "CRIT", "MAJ" ] }, - "name": { "type": "string" }, - "thresholdCrossed": { "type": "string" }, - "value": { "type": "string"} + "criticality": { + "type": "string", + "enum": [ + "CRIT", + "MAJ" + ] + }, + "name": { + "type": "string" + }, + "thresholdCrossed": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "required": [ "criticality", "name", "thresholdCrossed", "value" ] + "required": [ + "criticality", + "name", + "thresholdCrossed", + "value" + ] }, "cpuUsage": { "description": "percent usage of an identified CPU", "type": "object", "properties": { - "cpuIdentifier": { "type": "string" }, - "percentUsage": { "type": "number" } + "cpuIdentifier": { + "type": "string" + }, + "percentUsage": { + "type": "number" + } }, - "required": [ "cpuIdentifier", "percentUsage" ] + "required": [ + "cpuIdentifier", + "percentUsage" + ] }, - "endOfCallVqmSummaries": { - "description": "", + "endOfCallVqmSummaries": { + "description": "", "type": "object", "properties": { - "adjacencyName": { - "description": " adjacency name", - "type": "string" - }, - "endpointDescription": { - "description": "‘Caller’, ‘Callee’", - "type": "string", - "enum": ["Caller", "Callee"] - }, - "endpointJitter": { - "description": "", - "type": "number" - }, - "endpointRtpOctetsDiscarded": { - "description": "", - "type": "number" - }, - "endpointRtpOctetsReceived": { - "description": "", - "type": "number" - }, - "endpointRtpOctetsSent": { - "description": "", - "type": "number" - }, - "endpointRtpPacketsDiscarded": { - "description": "", - "type": "number" - }, - "endpointRtpPacketsReceived": { - "description": "", - "type": "number" - }, - "endpointRtpPacketsSent": { - "description": "", - "type": "number" - }, - "localJitter": { - "description": "", - "type": "number" - }, - "localRtpOctetsDiscarded": { - "description": "", - "type": "number" - }, - "localRtpOctetsReceived": { - "description": "", - "type": "number" - }, - "localRtpOctetsSent": { - "description": "", - "type": "number" - }, - "localRtpPacketsDiscarded": { - "description": "", - "type": "number" - }, - "localRtpPacketsReceived": { - "description": "", - "type": "number" - }, - "localRtpPacketsSent": { - "description": "", - "type": "number" - }, - "mosCqe": { - "description": "1-5 1dp", - "type": "number" - }, - "packetsLost": { - "description": "", - "type": "number" - }, - "packetLossPercent": { - "description" : "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)", - "type": "number" - }, - "rFactor": { - "description": "0-100", - "type": "number" - }, - "roundTripDelay": { - "description": "millisecs", - "type": "number" - } - } - }, + "adjacencyName": { + "description": " adjacency name", + "type": "string" + }, + "endpointDescription": { + "description": "‘Caller’, ‘Callee’", + "type": "string", + "enum": [ + "Caller", + "Callee" + ] + }, + "endpointJitter": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsDiscarded": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsReceived": { + "description": "", + "type": "number" + }, + "endpointRtpOctetsSent": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsDiscarded": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsReceived": { + "description": "", + "type": "number" + }, + "endpointRtpPacketsSent": { + "description": "", + "type": "number" + }, + "localJitter": { + "description": "", + "type": "number" + }, + "localRtpOctetsDiscarded": { + "description": "", + "type": "number" + }, + "localRtpOctetsReceived": { + "description": "", + "type": "number" + }, + "localRtpOctetsSent": { + "description": "", + "type": "number" + }, + "localRtpPacketsDiscarded": { + "description": "", + "type": "number" + }, + "localRtpPacketsReceived": { + "description": "", + "type": "number" + }, + "localRtpPacketsSent": { + "description": "", + "type": "number" + }, + "mosCqe": { + "description": "1-5 1dp", + "type": "number" + }, + "packetsLost": { + "description": "", + "type": "number" + }, + "packetLossPercent": { + "description": "Calculated percentage packet loss based on Endpoint RTP packets lost (as reported in RTCP) and Local RTP packets sent. Direction is based on Endpoint description (Caller, Callee). Decimal (2 dp)", + "type": "number" + }, + "rFactor": { + "description": "0-100", + "type": "number" + }, + "roundTripDelay": { + "description": "millisecs", + "type": "number" + } + } + }, "errors": { "description": "receive and transmit errors for the measurements domain", "type": "object", "properties": { - "receiveDiscards": { "type": "number" }, - "receiveErrors": { "type": "number" }, - "transmitDiscards": { "type": "number" }, - "transmitErrors": { "type": "number" } + "receiveDiscards": { + "type": "number" + }, + "receiveErrors": { + "type": "number" + }, + "transmitDiscards": { + "type": "number" + }, + "transmitErrors": { + "type": "number" + } }, - "required": [ "receiveDiscards", "receiveErrors", "transmitDiscards", "transmitErrors" ] + "required": [ + "receiveDiscards", + "receiveErrors", + "transmitDiscards", + "transmitErrors" + ] + }, + "event": { + "description": "generic event format", + "type": "object", + "properties": { + "commonEventHeader": { + "$ref": "#/definitions/commonEventHeader" + }, + "faultFields": { + "$ref": "#/definitions/faultFields" + }, + "measurementsForVfScalingFields": { + "$ref": "#/definitions/measurementsForVfScalingFields" + }, + "mobileFlowFields": { + "$ref": "#/definitions/mobileFlowFields" + }, + "otherFields": { + "$ref": "#/definitions/otherFields" + }, + "serviceEventsFields": { + "$ref": "#/definitions/serviceEventsFields" + }, + "signalingFields": { + "$ref": "#/definitions/signalingFields" + }, + "stateChangeFields": { + "$ref": "#/definitions/stateChangeFields" + }, + "syslogFields": { + "$ref": "#/definitions/syslogFields" + }, + "thresholdCrossingAlertFields": { + "$ref": "#/definitions/thresholdCrossingAlertFields" + } + }, + "required": [ + "commonEventHeader" + ] }, - "event": { - "description": "generic event format", - "type": "object", - "properties": { - "commonEventHeader": { "$ref": "#/definitions/commonEventHeader" }, - "faultFields": { "$ref": "#/definitions/faultFields" }, - "measurementsForVfScalingFields": { "$ref": "#/definitions/measurementsForVfScalingFields" }, - "mobileFlowFields": { "$ref": "#/definitions/mobileFlowFields" }, - "otherFields": { "$ref": "#/definitions/otherFields" }, - "serviceEventsFields": { "$ref": "#/definitions/serviceEventsFields" }, - "signalingFields": { "$ref": "#/definitions/signalingFields" }, - "stateChangeFields": { "$ref": "#/definitions/stateChangeFields" }, - "syslogFields": { "$ref": "#/definitions/syslogFields" }, - "thresholdCrossingAlertFields": { "$ref": "#/definitions/thresholdCrossingAlertFields" } - }, - "required": [ "commonEventHeader" ] - }, "eventDomainThrottleSpecification": { "description": "specification of what information to suppress within an event domain", "type": "object", "properties": { - "eventDomain": { - "description": "Event domain enum from the commonEventHeader domain field", - "type": "string" - }, - "suppressedFieldNames": { - "description": "List of optional field names in the event block that should not be sent to the Event Listener", - "type": "array", + "eventDomain": { + "description": "Event domain enum from the commonEventHeader domain field", + "type": "string" + }, + "suppressedFieldNames": { + "description": "List of optional field names in the event block that should not be sent to the Event Listener", + "type": "array", "items": { - "type": "string" + "type": "string" } - }, + }, "suppressedNvPairsList": { "description": "Optional list of specific NvPairsNames to suppress within a given Name-Value Field", - "type": "array", + "type": "array", "items": { - "$ref": "#/definitions/suppressedNvPairs" + "$ref": "#/definitions/suppressedNvPairs" } - } + } }, - "required": [ "eventDomain" ] + "required": [ + "eventDomain" + ] }, "eventDomainThrottleSpecificationList": { "description": "array of eventDomainThrottleSpecifications", "type": "array", "items": { - "$ref": "#/definitions/eventDomainThrottleSpecification" + "$ref": "#/definitions/eventDomainThrottleSpecification" }, "minItems": 0 }, @@ -369,9 +462,12 @@ "description": "event instance friendly name", "type": "string" } - }, - "required": [ "eventId", "vendorId" ] - }, + }, + "required": [ + "eventId", + "vendorId" + ] + }, "eventList": { "description": "array of events", "type": "array", @@ -383,17 +479,21 @@ "description": "reports the throttling in force at the event source", "type": "object", "properties": { - "eventThrottlingMode": { - "description": "Mode the event manager is in", - "type": "string", + "eventThrottlingMode": { + "description": "Mode the event manager is in", + "type": "string", "enum": [ "normal", "throttled" ] - }, - "eventDomainThrottleSpecificationList": { "$ref": "#/definitions/eventDomainThrottleSpecificationList" } + }, + "eventDomainThrottleSpecificationList": { + "$ref": "#/definitions/eventDomainThrottleSpecificationList" + } }, - "required": [ "eventThrottlingMode" ] + "required": [ + "eventThrottlingMode" + ] }, "faultFields": { "description": "fields specific to fault events", @@ -449,41 +549,81 @@ ] } }, - "required": [ "alarmCondition", "eventSeverity", - "eventSourceType", "specificProblem", "vfStatus" ] + "required": [ + "alarmCondition", + "eventSeverity", + "eventSourceType", + "specificProblem", + "vfStatus" + ] }, "featuresInUse": { "description": "number of times an identified feature was used over the measurementInterval", "type": "object", "properties": { - "featureIdentifier": { "type": "string" }, - "featureUtilization": { "type": "number" } + "featureIdentifier": { + "type": "string" + }, + "featureUtilization": { + "type": "number" + } }, - "required": [ "featureIdentifier", "featureUtilization" ] + "required": [ + "featureIdentifier", + "featureUtilization" + ] }, "field": { "description": "name value pair", "type": "object", "properties": { - "name": { "type": "string" }, - "value": { "type": "string" } + "name": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "required": [ "name", "value" ] + "required": [ + "name", + "value" + ] }, "filesystemUsage": { "description": "disk usage of an identified virtual machine in gigabytes and/or gigabytes per second", "type": "object", "properties": { - "blockConfigured": { "type": "number" }, - "blockIops": { "type": "number" }, - "blockUsed": { "type": "number" }, - "ephemeralConfigured": { "type": "number" }, - "ephemeralIops": { "type": "number" }, - "ephemeralUsed": { "type": "number" }, - "filesystemName": { "type": "string" } + "blockConfigured": { + "type": "number" + }, + "blockIops": { + "type": "number" + }, + "blockUsed": { + "type": "number" + }, + "ephemeralConfigured": { + "type": "number" + }, + "ephemeralIops": { + "type": "number" + }, + "ephemeralUsed": { + "type": "number" + }, + "filesystemName": { + "type": "string" + } }, - "required": [ "blockConfigured", "blockIops", "blockUsed", "ephemeralConfigured", - "ephemeralIops", "ephemeralUsed", "filesystemName" ] + "required": [ + "blockConfigured", + "blockIops", + "blockUsed", + "ephemeralConfigured", + "ephemeralIops", + "ephemeralUsed", + "filesystemName" + ] }, "gtpPerFlowMetrics": { "description": "Mobility GTP Protocol per flow metrics", @@ -563,13 +703,17 @@ }, "ipTosCountList": { "description": "array of key: value pairs where the keys are drawn from the IP Type-of-Service identifiers which range from '0' to '255', and the values are the count of packets that had those ToS identifiers in the flow", - "type": "array", - "uniqueItems": true, - "items": { + "type": "array", + "uniqueItems": true, + "items": { "type": "array", "items": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ], "additionalItems": false } @@ -603,13 +747,17 @@ }, "mobileQciCosCountList": { "description": "array of key: value pairs where the keys are drawn from LTE QCI or UMTS class of service strings, and the values are the count of packets that had those strings in the flow", - "type": "array", - "uniqueItems": true, - "items": { + "type": "array", + "uniqueItems": true, + "items": { "type": "array", "items": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ], "additionalItems": false } @@ -703,13 +851,17 @@ }, "tcpFlagCountList": { "description": "array of key: value pairs where the keys are drawn from TCP Flags and the values are the count of packets that had that TCP Flag in the flow", - "type": "array", - "uniqueItems": true, - "items": { + "type": "array", + "uniqueItems": true, + "items": { "type": "array", "items": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ], "additionalItems": false } @@ -726,54 +878,85 @@ "type": "number" } }, - "required": [ "avgBitErrorRate", "avgPacketDelayVariation", "avgPacketLatency", - "avgReceiveThroughput", "avgTransmitThroughput", - "flowActivationEpoch", "flowActivationMicrosec", - "flowDeactivationEpoch", "flowDeactivationMicrosec", - "flowDeactivationTime", "flowStatus", - "maxPacketDelayVariation", "numActivationFailures", - "numBitErrors", "numBytesReceived", "numBytesTransmitted", - "numDroppedPackets", "numL7BytesReceived", - "numL7BytesTransmitted", "numLostPackets", - "numOutOfOrderPackets", "numPacketErrors", - "numPacketsReceivedExclRetrans", - "numPacketsReceivedInclRetrans", - "numPacketsTransmittedInclRetrans", - "numRetries", "numTimeouts", "numTunneledL7BytesReceived", - "roundTripTime", "timeToFirstByte" + "required": [ + "avgBitErrorRate", + "avgPacketDelayVariation", + "avgPacketLatency", + "avgReceiveThroughput", + "avgTransmitThroughput", + "flowActivationEpoch", + "flowActivationMicrosec", + "flowDeactivationEpoch", + "flowDeactivationMicrosec", + "flowDeactivationTime", + "flowStatus", + "maxPacketDelayVariation", + "numActivationFailures", + "numBitErrors", + "numBytesReceived", + "numBytesTransmitted", + "numDroppedPackets", + "numL7BytesReceived", + "numL7BytesTransmitted", + "numLostPackets", + "numOutOfOrderPackets", + "numPacketErrors", + "numPacketsReceivedExclRetrans", + "numPacketsReceivedInclRetrans", + "numPacketsTransmittedInclRetrans", + "numRetries", + "numTimeouts", + "numTunneledL7BytesReceived", + "roundTripTime", + "timeToFirstByte" ] }, "latencyBucketMeasure": { "description": "number of counts falling within a defined latency bucket", "type": "object", "properties": { - "countsInTheBucket": { "type": "number" }, - "highEndOfLatencyBucket": { "type": "number" }, - "lowEndOfLatencyBucket": { "type": "number" } + "countsInTheBucket": { + "type": "number" + }, + "highEndOfLatencyBucket": { + "type": "number" + }, + "lowEndOfLatencyBucket": { + "type": "number" + } }, - "required": [ "countsInTheBucket" ] + "required": [ + "countsInTheBucket" + ] }, - "marker": { - "description": "", + "marker": { + "description": "", "type": "object", "properties": { - "phoneNumber": { "type": "string" } + "phoneNumber": { + "type": "string" + } } - }, + }, "measurementGroup": { "description": "measurement group", "type": "object", "properties": { - "name": { "type": "string" }, + "name": { + "type": "string" + }, "measurements": { "description": "array of name value pair measurements", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } } }, - "required": [ "name", "measurements" ] + "required": [ + "name", + "measurements" + ] }, "measurementsForVfScalingFields": { "description": "measurementsForVfScaling fields", @@ -812,7 +995,9 @@ "$ref": "#/definitions/cpuUsage" } }, - "errors": { "$ref": "#/definitions/errors" }, + "errors": { + "$ref": "#/definitions/errors" + }, "featureUsageArray": { "description": "array of features in use", "type": "array", @@ -874,18 +1059,20 @@ } } }, - "required": [ "measurementInterval" ] + "required": [ + "measurementInterval" + ] }, - "midCallRtcp": { - "description": "RTCP packet received ", + "midCallRtcp": { + "description": "RTCP packet received ", "type": "object", "properties": { "rtcpData": { - "description": "Base64 encoding of the binary RTCP data (excluding Eth/IP/UDP headers) Base64 encoded array of bytes", - "type": "string" - } + "description": "Base64 encoding of the binary RTCP data (excluding Eth/IP/UDP headers) Base64 encoded array of bytes", + "type": "string" + } } - }, + }, "mobileFlowFields": { "description": "mobileFlow fields", "type": "object", @@ -918,7 +1105,9 @@ "description": "Flow direction, indicating if the reporting node is the source of the flow or destination for the flow", "type": "string" }, - "gtpPerFlowMetrics": { "$ref": "#/definitions/gtpPerFlowMetrics" }, + "gtpPerFlowMetrics": { + "$ref": "#/definitions/gtpPerFlowMetrics" + }, "gtpProtocolType": { "description": "GTP protocol", "type": "string" @@ -959,10 +1148,10 @@ "description": "mobile network code", "type": "string" }, - "mobileFlowFieldsVersion": { - "description": "version of the mobileFlowFields block", - "type": "number" - }, + "mobileFlowFieldsVersion": { + "description": "version of the mobileFlowFields block", + "type": "number" + }, "msisdn": { "description": "MSISDN for the subscriber UE used in this flow, as an integer, if the flow connects to a mobile device", "type": "string" @@ -1016,9 +1205,16 @@ "type": "string" } }, - "required": [ "flowDirection", "gtpPerFlowMetrics", "ipProtocolType", - "ipVersion", "otherEndpointIpAddress", "otherEndpointPort", - "reportingEndpointIpAddr", "reportingEndpointPort" ] + "required": [ + "flowDirection", + "gtpPerFlowMetrics", + "ipProtocolType", + "ipVersion", + "otherEndpointIpAddress", + "otherEndpointPort", + "reportingEndpointIpAddr", + "reportingEndpointPort" + ] }, "otherFields": { "description": "additional fields not reported elsewhere", @@ -1031,7 +1227,7 @@ "description": "standard request error data structure", "type": "object", "properties": { - "messageId": { + "messageId": { "description": "Unique message identifier of the format ‘ABCnnnn’ where ‘ABC’ is either ‘SVC’ for Service Exceptions or ‘POL’ for Policy Exception", "type": "string" }, @@ -1048,90 +1244,97 @@ "type": "string" } }, - "required": [ "messageId", "text" ] + "required": [ + "messageId", + "text" + ] }, - "serviceEventsFields": { - "description": "service events fields", - "type": "object", - "properties": { - "additionalFields": { + "serviceEventsFields": { + "description": "service events fields", + "type": "object", + "properties": { + "additionalFields": { "description": "additional service event fields if needed", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } - }, - "codecSelected": { - "$ref": "#/definitions/codecSelected" - }, - "codecSelectedTranscoding": { - "$ref": "#/definitions/codecSelectedTranscoding" - }, - "correlator": { - "description": "this is the same for all events on this call", - "type": "string" - }, - "endOfCallVqmSummaries": { - "$ref": "#/definitions/endOfCallVqmSummaries" - }, - "eventInstanceIdentifier": { - "$ref": "#/definitions/eventInstanceIdentifier" - }, - "marker": { - "$ref": "#/definitions/marker" - }, - "midCallRtcp": { - "$ref": "#/definitions/midCallRtcp" - }, - "serviceEventsFieldsVersion": { - "description": "version of the serviceEventsFields block", - "type": "number" - } - }, - "required": [ "eventInstanceIdentifier" ] - }, - "signalingFields": { - "description": "signaling fields", - "type": "object", - "properties": { - "compressedSip": { - "description": "the full SIP request/response including headers and bodies", - "type": "string" - }, - "correlator": { - "description": "this is the same for all events on this call", - "type": "string" - }, - "eventInstanceIdentifier": { - "$ref": "#/definitions/eventInstanceIdentifier" - }, - "localIpAddress": { - "description": "IP address on VNF", - "type": "string" - }, - "localPort": { - "description": "port on VNF", - "type": "string" - }, - "remoteIpAddress": { - "description": "IP address of peer endpoint", - "type": "string" - }, - "remotePort": { - "description": "port of peer endpoint", - "type": "string" - }, - "signalingFieldsVersion": { - "description": "version of the signalingFields block", - "type": "number" - }, - "summarySip": { - "description": "the SIP Method or Response (‘INVITE’, ‘200 OK’, ‘BYE’, etc)", - "type": "string" - } - }, - "required": [ "eventInstanceIdentifier" ] - }, + }, + "codecSelected": { + "$ref": "#/definitions/codecSelected" + }, + "codecSelectedTranscoding": { + "$ref": "#/definitions/codecSelectedTranscoding" + }, + "correlator": { + "description": "this is the same for all events on this call", + "type": "string" + }, + "endOfCallVqmSummaries": { + "$ref": "#/definitions/endOfCallVqmSummaries" + }, + "eventInstanceIdentifier": { + "$ref": "#/definitions/eventInstanceIdentifier" + }, + "marker": { + "$ref": "#/definitions/marker" + }, + "midCallRtcp": { + "$ref": "#/definitions/midCallRtcp" + }, + "serviceEventsFieldsVersion": { + "description": "version of the serviceEventsFields block", + "type": "number" + } + }, + "required": [ + "eventInstanceIdentifier" + ] + }, + "signalingFields": { + "description": "signaling fields", + "type": "object", + "properties": { + "compressedSip": { + "description": "the full SIP request/response including headers and bodies", + "type": "string" + }, + "correlator": { + "description": "this is the same for all events on this call", + "type": "string" + }, + "eventInstanceIdentifier": { + "$ref": "#/definitions/eventInstanceIdentifier" + }, + "localIpAddress": { + "description": "IP address on VNF", + "type": "string" + }, + "localPort": { + "description": "port on VNF", + "type": "string" + }, + "remoteIpAddress": { + "description": "IP address of peer endpoint", + "type": "string" + }, + "remotePort": { + "description": "port of peer endpoint", + "type": "string" + }, + "signalingFieldsVersion": { + "description": "version of the signalingFields block", + "type": "number" + }, + "summarySip": { + "description": "the SIP Method or Response (‘INVITE’, ‘200 OK’, ‘BYE’, etc)", + "type": "string" + } + }, + "required": [ + "eventInstanceIdentifier" + ] + }, "stateChangeFields": { "description": "stateChange fields", "type": "object", @@ -1170,7 +1373,11 @@ "type": "string" } }, - "required": [ "newState", "oldState", "stateInterface" ] + "required": [ + "newState", + "oldState", + "stateInterface" + ] }, "suppressedNvPairs": { "description": "List of specific NvPairsNames to suppress within a given Name-Value Field for event Throttling", @@ -1182,13 +1389,16 @@ }, "suppressedNvPairNames": { "description": "Array of nvpair names to suppress within the nvpairFieldName", - "type": "array", + "type": "array", "items": { - "type": "string" + "type": "string" } } }, - "required": [ "nvPairFieldName", "suppressedNvPairNames" ] + "required": [ + "nvPairFieldName", + "suppressedNvPairNames" + ] }, "syslogFields": { "description": "sysLog fields", @@ -1242,7 +1452,11 @@ "type": "number" } }, - "required": [ "eventSourceType", "syslogMsg", "syslogTag" ] + "required": [ + "eventSourceType", + "syslogMsg", + "syslogTag" + ] }, "thresholdCrossingAlertFields": { "description": "fields specific to threshold crossing alert events", @@ -1251,8 +1465,8 @@ "additionalFields": { "description": "additional threshold crossing alert fields if needed", "type": "array", - "items": { - "$ref": "#/definitions/field" + "items": { + "$ref": "#/definitions/field" } }, "additionalParameters": { @@ -1292,7 +1506,9 @@ "associatedAlertIdList": { "description": "List of eventIds associated with the event being reported", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "collectionTimestamp": { "description": "Time when the performance collector picked up the data; with RFC 2822 compliant format: ‘Sat, 13 Mar 2010 11:29:05 -0800’", @@ -1352,25 +1568,57 @@ "description": "usage of identified virtual network interface card", "type": "object", "properties": { - "broadcastPacketsIn": { "type": "number" }, - "broadcastPacketsOut": { "type": "number" }, - "bytesIn": { "type": "number" }, - "bytesOut": { "type": "number" }, - "multicastPacketsIn": { "type": "number" }, - "multicastPacketsOut": { "type": "number" }, - "packetsIn": { "type": "number" }, - "packetsOut": { "type": "number" }, - "unicastPacketsIn": { "type": "number" }, - "unicastPacketsOut": { "type": "number" }, - "vNicIdentifier": { "type": "string" } + "broadcastPacketsIn": { + "type": "number" + }, + "broadcastPacketsOut": { + "type": "number" + }, + "bytesIn": { + "type": "number" + }, + "bytesOut": { + "type": "number" + }, + "multicastPacketsIn": { + "type": "number" + }, + "multicastPacketsOut": { + "type": "number" + }, + "packetsIn": { + "type": "number" + }, + "packetsOut": { + "type": "number" + }, + "unicastPacketsIn": { + "type": "number" + }, + "unicastPacketsOut": { + "type": "number" + }, + "vNicIdentifier": { + "type": "string" + } }, - "required": [ "bytesIn", "bytesOut", "packetsIn", "packetsOut", "vNicIdentifier"] + "required": [ + "bytesIn", + "bytesOut", + "packetsIn", + "packetsOut", + "vNicIdentifier" + ] } }, "title": "Event Listener", - "type": "object", - "properties": { - "event": {"$ref": "#/definitions/event"} - }, - "required": ["event"] + "type": "object", + "properties": { + "event": { + "$ref": "#/definitions/event" + } + }, + "required": [ + "event" + ] } diff --git a/src/main/java/org/onap/dcae/commonFunction/CommonStartup.java b/src/main/java/org/onap/dcae/commonFunction/CommonStartup.java index fe3ba325..55a83f7d 100644 --- a/src/main/java/org/onap/dcae/commonFunction/CommonStartup.java +++ b/src/main/java/org/onap/dcae/commonFunction/CommonStartup.java @@ -63,7 +63,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import javax.servlet.ServletException; - public class CommonStartup extends NsaBaseEndpoint implements Runnable { public static final String KCONFIG = "c"; @@ -194,14 +193,15 @@ public class CommonStartup extends NsaBaseEndpoint implements Runnable { executor = Executors.newFixedThreadPool(20); executor.execute(ep); - } catch (loadException | missingReqdSetting | IOException | invalidSettingValue | ServletException | InterruptedException e) { + } catch (loadException | missingReqdSetting | IOException | invalidSettingValue | ServletException + | InterruptedException e) { CommonStartup.eplog.error("FATAL_STARTUP_ERROR" + e.getMessage()); throw new RuntimeException(e); } catch (Throwable e) { - System.err.println("Uncaught exception - " + e.getMessage()); - CommonStartup.eplog.error("FATAL_ERROR" + e.getMessage() ); - e.printStackTrace(System.err); - } finally { + System.err.println("Uncaught exception - " + e.getMessage()); + CommonStartup.eplog.error("FATAL_ERROR" + e.getMessage()); + e.printStackTrace(System.err); + } finally { // This will make the executor accept no new threads // and finish all existing threads in the queue if (executor != null) { @@ -310,4 +310,3 @@ public class CommonStartup extends NsaBaseEndpoint implements Runnable { private static final Logger log = LoggerFactory.getLogger(CommonStartup.class); } - diff --git a/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java b/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java index 51158aa7..7e42bb57 100644 --- a/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java +++ b/src/main/java/org/onap/dcae/commonFunction/ConfigProcessors.java @@ -21,7 +21,6 @@ package org.onap.dcae.commonFunction; - import java.text.DecimalFormat; import org.json.JSONArray; import org.json.JSONObject; @@ -37,633 +36,546 @@ public class ConfigProcessors { private static final String VALUE = "value"; private static final String REGEX = "\\[\\]"; private static final String OBJECT_NOT_FOUND = "ObjectNotFound"; - - public ConfigProcessors(JSONObject eventJson) - { - event = eventJson; - } - - /** - * - */ - public void getValue(JSONObject J) - { - //log.info("addAttribute"); - final String field = J.getString(FIELD); - //final String value = J.getString(VALUE); - final JSONObject filter = J.optJSONObject(FILTER); - if (filter == null || isFilterMet(filter)) - { - //log.info("field ==" + field); - //log.info("value ==" + value); - getEventObjectVal(field); - } - else - log.info("Filter not met"); - } - - /** - * - */ - public void setValue(JSONObject J) - { - //log.info("addAttribute"); - final String field = J.getString(FIELD); - final String value = J.getString(VALUE); - final JSONObject filter = J.optJSONObject(FILTER); - if (filter == null || isFilterMet(filter)) - { - //log.info("field ==" + field); - //log.info("value ==" + value); - setEventObjectVal(field, value); - } - else - log.info("Filter not met"); - } - - /** - * - */ - public String evaluate(String str) - { - String value = str; - if (str.startsWith("$")) - { - value = (String) getEventObjectVal(str.substring(1)); - - } - return value; - } - - /** - * { "functionName":"suppressEvent", - "args":{} + + public ConfigProcessors(JSONObject eventJson) { + event = eventJson; + } + + /** + * + */ + public void getValue(JSONObject J) { + // log.info("addAttribute"); + final String field = J.getString(FIELD); + // final String value = J.getString(VALUE); + final JSONObject filter = J.optJSONObject(FILTER); + if (filter == null || isFilterMet(filter)) { + // log.info("field ==" + field); + // log.info("value ==" + value); + getEventObjectVal(field); + } else + log.info("Filter not met"); + } + + /** + * + */ + public void setValue(JSONObject J) { + // log.info("addAttribute"); + final String field = J.getString(FIELD); + final String value = J.getString(VALUE); + final JSONObject filter = J.optJSONObject(FILTER); + if (filter == null || isFilterMet(filter)) { + // log.info("field ==" + field); + // log.info("value ==" + value); + setEventObjectVal(field, value); + } else + log.info("Filter not met"); + } + + /** + * + */ + public String evaluate(String str) { + String value = str; + if (str.startsWith("$")) { + value = (String) getEventObjectVal(str.substring(1)); + + } + return value; + } + + /** + * { "functionName":"suppressEvent", "args":{} } + */ + public void suppressEvent(JSONObject J) { + // log.info("addAttribute"); + final JSONObject filter = J.optJSONObject(FILTER); + + if (filter == null || isFilterMet(filter)) { + // log.info("field ==" + field); + // log.info("value ==" + value); + setEventObjectVal("suppressEvent", "true"); + } else + log.info("Filter not met"); + } + + /** + * + */ + public void addAttribute(JSONObject J) { + // log.info("addAttribute begin"); + final String field = J.getString(FIELD); + final String value = evaluate(J.getString(VALUE)); + final JSONObject filter = J.optJSONObject(FILTER); + final String fieldType = J.optString("fieldType", "string").toLowerCase(); + + if (filter == null || isFilterMet(filter)) { + // log.info("field ==" + field); + // log.info("value ==" + value); + setEventObjectVal(field, value, fieldType); + } else + log.info("Filter not met"); + // log.info("addAttribute End"); + } + + /** + * + */ + public void updateAttribute(JSONObject J) { + // log.info("updateAttribute"); + final String field = J.getString(FIELD); + final String value = evaluate(J.getString(VALUE)); + final JSONObject filter = J.optJSONObject(FILTER); + if (filter == null || isFilterMet(filter)) { + // log.info("field ==" + field); + // log.info("value ==" + value); + setEventObjectVal(field, value); + } else + log.info("Filter not met"); + } + + /** + * + */ + public void removeAttribute(JSONObject J) { + // log.info("removeAttribute"); + final String field = J.getString(FIELD); + final JSONObject filter = J.optJSONObject(FILTER); + + if (filter == null || isFilterMet(filter)) { + removeEventKey(field); + } else + log.info("Filter not met"); + } + + /** + * + */ + public void renameArrayInArray(JSONObject J) // map + { + log.info("renameArrayInArray"); + final String field = J.getString(FIELD); + final String oldField = J.getString(OLD_FIELD); + final JSONObject filter = J.optJSONObject(FILTER); + // String value = ""; + if (filter == null || isFilterMet(filter)) { + // log.info("field ==" + field); + final String[] fsplit = field.split(REGEX, field.length()); + final String[] oldfsplit = oldField.split(REGEX, oldField.length()); + /* + * for (int i=0; i< oldfsplit.length; i++ ) { log.info( + * "renameArrayInArray " + i + " ==" + oldfsplit[i]); } + */ + + final String oldValue = getEventObjectVal(oldfsplit[0]).toString(); + if (!oldValue.equals(OBJECT_NOT_FOUND)) { + final String oldArrayName = oldfsplit[1].substring(1); + final String newArrayName = fsplit[1].substring(1); + final String value = oldValue.replaceAll(oldArrayName, newArrayName); + // log.info("oldArrayName ==" + oldArrayName); + // log.info("newArrayName ==" + newArrayName); + log.info("oldValue ==" + oldValue); + log.info("value ==" + value); + JSONArray ja = new JSONArray(value); + removeEventKey(oldfsplit[0]); + setEventObjectVal(fsplit[0], ja); } - */ - public void suppressEvent(JSONObject J) - { - //log.info("addAttribute"); - final JSONObject filter = J.optJSONObject(FILTER); - - if (filter == null || isFilterMet(filter)) - { - //log.info("field ==" + field); - //log.info("value ==" + value); - setEventObjectVal("suppressEvent", "true"); - } - else - log.info("Filter not met"); - } - - /** - * - */ - public void addAttribute(JSONObject J) - { - //log.info("addAttribute begin"); - final String field = J.getString(FIELD); - final String value = evaluate(J.getString(VALUE)); - final JSONObject filter = J.optJSONObject(FILTER); - final String fieldType = J.optString("fieldType", "string").toLowerCase(); - - if (filter == null || isFilterMet(filter)) - { - //log.info("field ==" + field); - //log.info("value ==" + value); - setEventObjectVal(field, value, fieldType); - } - else - log.info("Filter not met"); - //log.info("addAttribute End"); - } - - /** - * - */ - public void updateAttribute(JSONObject J) - { - //log.info("updateAttribute"); - final String field = J.getString(FIELD); - final String value = evaluate(J.getString(VALUE)); - final JSONObject filter = J.optJSONObject(FILTER); - if (filter == null || isFilterMet(filter)) - { - //log.info("field ==" + field); - //log.info("value ==" + value); - setEventObjectVal(field, value); - } - else - log.info("Filter not met"); - } - - /** - * - */ - public void removeAttribute(JSONObject J) - { - //log.info("removeAttribute"); - final String field = J.getString(FIELD); - final JSONObject filter = J.optJSONObject(FILTER); - - if (filter == null || isFilterMet(filter)) - { - removeEventKey(field); - } - else - log.info("Filter not met"); - } - - /** - * - */ - public void renameArrayInArray(JSONObject J) //map - { - log.info("renameArrayInArray"); - final String field = J.getString(FIELD); - final String oldField = J.getString(OLD_FIELD); - final JSONObject filter = J.optJSONObject(FILTER); - //String value = ""; - if (filter == null || isFilterMet(filter)) - { - //log.info("field ==" + field); - final String[] fsplit = field.split(REGEX, field.length()); - final String[] oldfsplit = oldField.split(REGEX, oldField.length()); - /*for (int i=0; i< oldfsplit.length; i++ ) - { - log.info( "renameArrayInArray " + i + " ==" + oldfsplit[i]); - }*/ - - final String oldValue = getEventObjectVal(oldfsplit[0]).toString(); - if (!oldValue.equals(OBJECT_NOT_FOUND)){ - final String oldArrayName = oldfsplit[1].substring(1); - final String newArrayName = fsplit[1].substring(1); - final String value = oldValue.replaceAll(oldArrayName, newArrayName); - //log.info("oldArrayName ==" + oldArrayName); - //log.info("newArrayName ==" + newArrayName); - log.info("oldValue ==" + oldValue); - log.info("value ==" + value); - JSONArray ja = new JSONArray(value); - removeEventKey(oldfsplit[0]); - setEventObjectVal(fsplit[0], ja); - } - } - else - log.info("Filter not met"); - } - - /** - * - */ - public void map(JSONObject J) - { - //log.info("mapAttribute"); - final String field = J.getString(FIELD); - if (field.contains("[]")) - { - if (field.matches(".*\\[\\]\\..*\\[\\]")) - renameArrayInArray(J); - else - mapToJArray(J); - } - else - mapAttribute(J); - } - - /** - * - */ - public String performOperation(String operation, String value) - { - log.info("performOperation"); - if (operation != null) - { - if (operation.equals("convertMBtoKB")) - { - float kbValue = Float.parseFloat(value) * 1024; - value = String.valueOf(kbValue); - } - } - return value; - } - - /** - * - */ - //public void mapAttributeToArrayAttribute(JSONObject J) - public void mapAttribute(JSONObject J) - { - //log.info("mapAttribute"); - final String field = J.getString(FIELD); - final String oldField = J.getString(OLD_FIELD); - final JSONObject filter = J.optJSONObject(FILTER); - final String operation = J.optString("operation"); - String value = ""; - if (filter == null || isFilterMet(filter)) - { - //log.info("field ==" + field); - - value = getEventObjectVal(oldField).toString(); - if (!value.equals(OBJECT_NOT_FOUND)) - { - if (operation != null && !operation.equals("")) - value = performOperation(operation, value); - //log.info("value ==" + value); - setEventObjectVal(field, value); - - removeEventKey(oldField); - } - } - else - log.info("Filter not met"); - } - - /** - * - */ - public void mapToJArray(JSONObject J) - { - log.info("mapToJArray"); - String field = J.getString(FIELD); - String oldField = J.getString(OLD_FIELD); - final JSONObject filter = J.optJSONObject(FILTER); - final JSONObject attrMap = J.optJSONObject("attrMap"); - oldField = oldField.replaceAll(REGEX, ""); - field = field.replaceAll(REGEX, ""); - - //log.info("oldField ==" + field); - if (filter == null || isFilterMet(filter)) - { - //log.info("oldField ==" + field); - String value = getEventObjectVal(oldField).toString(); - if (!value.equals(OBJECT_NOT_FOUND)) - { - log.info("old value ==" + value.toString()); - //update old value based on attrMap - if (attrMap != null) - { - //loop thru attrMap and update attribute name to new name - for (String key : attrMap.keySet()) - { - //log.info("attr key==" + key + " value==" + attrMap.getString(key)); - value = value.replaceAll(key, attrMap.getString(key)); - } - } - - log.info("new value ==" + value); - char c = value.charAt(0); - if (c != '[') - { - //oldfield is JsonObject - JSONObject valueJO = new JSONObject(value); - // if the array already exists - - String existingValue = getEventObjectVal(field).toString(); - if (!existingValue.equals(OBJECT_NOT_FOUND)) - { - JSONArray ja = new JSONArray(existingValue); - JSONObject jo = ja.optJSONObject(0); - if (jo != null) - { - for (String key : valueJO.keySet()) - { - jo.put(key, valueJO.get(key)); - - } - ja.put(0, jo); - //log.info("jarray== " + ja.toString()); - setEventObjectVal(field,ja); - } - } - else //if new array - setEventObjectVal(field + "[0]", new JSONObject(value), "JArray"); - } - else //oldfield is jsonArray - setEventObjectVal(field, new JSONArray(value)); - - removeEventKey(oldField); - } - } - else - log.info("Filter not met"); - } - - /** - * example - - { - "functionName": "concatenateValue", - "args":{ - "filter": {"event.commonEventHeader.event":"heartbeat"}, - FIELD:"event.commonEventHeader.eventName", - "concatenate": ["event.commonEventHeader.domain","event.commonEventHeader.eventType","event.commonEventHeader.alarmCondition"], - "delimiter":"_" - } - } - **/ - public void concatenateValue(JSONObject J) - { - //log.info("concatenateValue"); - final String field = J.getString(FIELD); - final String delimiter = J.getString("delimiter"); - final JSONArray values = J.getJSONArray("concatenate"); - final JSONObject filter = J.optJSONObject(FILTER); - if (filter == null || isFilterMet(filter)) - { - String value = ""; - for (int i=0; i < values.length(); i++) - { - //log.info(values.getString(i)); - String tempVal = evaluate(values.getString(i)); - if (!tempVal.equals(OBJECT_NOT_FOUND)) - { - if (i ==0) - value = value + tempVal; - else - value = value + delimiter + tempVal; - } - } - //log.info("value ==" + value); - setEventObjectVal(field, value); - } - else - log.info("Filter not met"); - } - - public void subtractValue(JSONObject J) - { - //log.info("concatenateValue"); - final String field = J.getString(FIELD); - final JSONArray values = J.getJSONArray("subtract"); - final JSONObject filter = J.optJSONObject(FILTER); - if (filter == null || isFilterMet(filter)) - { - float value = 0; - for (int i=0; i < values.length(); i++) - { - log.info(values.getString(i)); - String tempVal = evaluate(values.getString(i)); - log.info("tempVal==" + tempVal); - if (!tempVal.equals(OBJECT_NOT_FOUND)) - { - if (i ==0) - value = value + Float.valueOf(tempVal); - else - value = value - Float.valueOf(tempVal); - } - } - log.info("value ==" + value ); - setEventObjectVal(field, value, "number"); - } - else - log.info("Filter not met"); - } - - /** - * - */ - private void removeEventKey(String field) - { - String[] keySet = field.split("\\.",field.length()); - JSONObject keySeries = event; - for (int i=0; i<(keySet.length -1); i++ ) - { - //log.info( i + " ==" + keySet[i]); - keySeries = keySeries.getJSONObject(keySet[i]); - } - //log.info(keySet[keySet.length -1]); - - keySeries.remove(keySet[keySet.length -1]); - - } - - /** - * - */ - private boolean checkFilter(JSONObject jo, String key, String logicKey) - { - String filterValue = jo.getString(key); - boolean retVal = true; - - if(filterValue.contains(":")) - { - String[] splitVal = filterValue.split(":"); - //log.info(splitVal[0] + " " + splitVal[1]); - if (splitVal[0].equals("matches")) - { - if (logicKey.equals("not")) - { - //log.info("not"); - //log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "split1==" + splitVal[1]); - if (getEventObjectVal(key).toString().matches(splitVal[1])) - { - log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); - return false; - } - } - else - { - if (!(getEventObjectVal(key).toString().matches(splitVal[1]))) - { - log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); - return false; - } + } else + log.info("Filter not met"); + } + + /** + * + */ + public void map(JSONObject J) { + // log.info("mapAttribute"); + final String field = J.getString(FIELD); + if (field.contains("[]")) { + if (field.matches(".*\\[\\]\\..*\\[\\]")) + renameArrayInArray(J); + else + mapToJArray(J); + } else + mapAttribute(J); + } + + /** + * + */ + public String performOperation(String operation, String value) { + log.info("performOperation"); + if (operation != null) { + if (operation.equals("convertMBtoKB")) { + float kbValue = Float.parseFloat(value) * 1024; + value = String.valueOf(kbValue); + } + } + return value; + } + + /** + * + */ + // public void mapAttributeToArrayAttribute(JSONObject J) + public void mapAttribute(JSONObject J) { + // log.info("mapAttribute"); + final String field = J.getString(FIELD); + final String oldField = J.getString(OLD_FIELD); + final JSONObject filter = J.optJSONObject(FILTER); + final String operation = J.optString("operation"); + String value = ""; + if (filter == null || isFilterMet(filter)) { + // log.info("field ==" + field); + + value = getEventObjectVal(oldField).toString(); + if (!value.equals(OBJECT_NOT_FOUND)) { + if (operation != null && !operation.equals("")) + value = performOperation(operation, value); + // log.info("value ==" + value); + setEventObjectVal(field, value); + + removeEventKey(oldField); + } + } else + log.info("Filter not met"); + } + + /** + * + */ + public void mapToJArray(JSONObject J) { + log.info("mapToJArray"); + String field = J.getString(FIELD); + String oldField = J.getString(OLD_FIELD); + final JSONObject filter = J.optJSONObject(FILTER); + final JSONObject attrMap = J.optJSONObject("attrMap"); + oldField = oldField.replaceAll(REGEX, ""); + field = field.replaceAll(REGEX, ""); + + // log.info("oldField ==" + field); + if (filter == null || isFilterMet(filter)) { + // log.info("oldField ==" + field); + String value = getEventObjectVal(oldField).toString(); + if (!value.equals(OBJECT_NOT_FOUND)) { + log.info("old value ==" + value.toString()); + // update old value based on attrMap + if (attrMap != null) { + // loop thru attrMap and update attribute name to new name + for (String key : attrMap.keySet()) { + // log.info("attr key==" + key + " value==" + + // attrMap.getString(key)); + value = value.replaceAll(key, attrMap.getString(key)); } - } - if (splitVal[0].equals("contains")) - { - if (logicKey.equals("not")) - { - //log.info("not"); - //log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "split1==" + splitVal[1]); - if (getEventObjectVal(key).toString().contains(splitVal[1])) - { - log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); - return false; + + log.info("new value ==" + value); + char c = value.charAt(0); + if (c != '[') { + // oldfield is JsonObject + JSONObject valueJO = new JSONObject(value); + // if the array already exists + + String existingValue = getEventObjectVal(field).toString(); + if (!existingValue.equals(OBJECT_NOT_FOUND)) { + JSONArray ja = new JSONArray(existingValue); + JSONObject jo = ja.optJSONObject(0); + if (jo != null) { + for (String key : valueJO.keySet()) { + jo.put(key, valueJO.get(key)); + + } + ja.put(0, jo); + // log.info("jarray== " + ja.toString()); + setEventObjectVal(field, ja); } - } + } else // if new array + setEventObjectVal(field + "[0]", new JSONObject(value), "JArray"); + } else // oldfield is jsonArray + setEventObjectVal(field, new JSONArray(value)); + + removeEventKey(oldField); + } + } else + log.info("Filter not met"); + } + + /** + * example - { "functionName": "concatenateValue", "args":{ "filter": + * {"event.commonEventHeader.event":"heartbeat"}, + * FIELD:"event.commonEventHeader.eventName", "concatenate": + * ["event.commonEventHeader.domain","event.commonEventHeader.eventType","event.commonEventHeader.alarmCondition"], + * "delimiter":"_" } } + **/ + public void concatenateValue(JSONObject J) { + // log.info("concatenateValue"); + final String field = J.getString(FIELD); + final String delimiter = J.getString("delimiter"); + final JSONArray values = J.getJSONArray("concatenate"); + final JSONObject filter = J.optJSONObject(FILTER); + if (filter == null || isFilterMet(filter)) { + String value = ""; + for (int i = 0; i < values.length(); i++) { + // log.info(values.getString(i)); + String tempVal = evaluate(values.getString(i)); + if (!tempVal.equals(OBJECT_NOT_FOUND)) { + if (i == 0) + value = value + tempVal; else - { - if (!(getEventObjectVal(key).toString().contains(splitVal[1]))) - { - log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); - return false; - } + value = value + delimiter + tempVal; + } + } + // log.info("value ==" + value); + setEventObjectVal(field, value); + } else + log.info("Filter not met"); + } + + public void subtractValue(JSONObject J) { + // log.info("concatenateValue"); + final String field = J.getString(FIELD); + final JSONArray values = J.getJSONArray("subtract"); + final JSONObject filter = J.optJSONObject(FILTER); + if (filter == null || isFilterMet(filter)) { + float value = 0; + for (int i = 0; i < values.length(); i++) { + log.info(values.getString(i)); + String tempVal = evaluate(values.getString(i)); + log.info("tempVal==" + tempVal); + if (!tempVal.equals(OBJECT_NOT_FOUND)) { + if (i == 0) + value = value + Float.valueOf(tempVal); + else + value = value - Float.valueOf(tempVal); + } + } + log.info("value ==" + value); + setEventObjectVal(field, value, "number"); + } else + log.info("Filter not met"); + } + + /** + * + */ + private void removeEventKey(String field) { + String[] keySet = field.split("\\.", field.length()); + JSONObject keySeries = event; + for (int i = 0; i < (keySet.length - 1); i++) { + // log.info( i + " ==" + keySet[i]); + keySeries = keySeries.getJSONObject(keySet[i]); + } + // log.info(keySet[keySet.length -1]); + + keySeries.remove(keySet[keySet.length - 1]); + + } + + /** + * + */ + private boolean checkFilter(JSONObject jo, String key, String logicKey) { + String filterValue = jo.getString(key); + boolean retVal = true; + + if (filterValue.contains(":")) { + String[] splitVal = filterValue.split(":"); + // log.info(splitVal[0] + " " + splitVal[1]); + if (splitVal[0].equals("matches")) { + if (logicKey.equals("not")) { + // log.info("not"); + // log.info(filterValue + "==" + key + "==" + + // getEventObjectVal(key) + "split1==" + splitVal[1]); + if (getEventObjectVal(key).toString().matches(splitVal[1])) { + log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); + return false; + } + } else { + if (!(getEventObjectVal(key).toString().matches(splitVal[1]))) { + log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); + return false; } - } + } - else - { - if (logicKey.equals("not")) - { - if(getEventObjectVal(key).toString().equals(filterValue)) - { + if (splitVal[0].equals("contains")) { + if (logicKey.equals("not")) { + // log.info("not"); + // log.info(filterValue + "==" + key + "==" + + // getEventObjectVal(key) + "split1==" + splitVal[1]); + if (getEventObjectVal(key).toString().contains(splitVal[1])) { log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); return false; } + } else { + if (!(getEventObjectVal(key).toString().contains(splitVal[1]))) { + log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); + return false; + } + } + + } + } else { + if (logicKey.equals("not")) { + if (getEventObjectVal(key).toString().equals(filterValue)) { + log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); + return false; + } + } else { + if (!(getEventObjectVal(key).toString().equals(filterValue))) { + log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); + return false; + } + } + } + return retVal; + } + + /** + * + */ + public boolean isFilterMet(JSONObject jo) { + boolean retval = true; + // log.info("Filter==" + jo.toString()); + for (String key : jo.keySet()) { + if (key.equals("not")) { + JSONObject njo = jo.getJSONObject(key); + for (String njoKey : njo.keySet()) { + // log.info(njoKey); + retval = checkFilter(njo, njoKey, key); + if (retval == false) + return retval; + } + } else { + // log.info(key); + // final String filterKey = key; + retval = checkFilter(jo, key, key); + if (retval == false) + return retval; + } + } + return true; + } + + /** + * returns a string or JSONObject or JSONArray + **/ + public Object getEventObjectVal(String keySeriesStr) { + keySeriesStr = keySeriesStr.replaceAll("\\[", "."); + keySeriesStr = keySeriesStr.replaceAll("\\]", "."); + if (keySeriesStr.contains("..")) { + keySeriesStr = keySeriesStr.replaceAll("\\.\\.", "."); + } + // log.info(Integer.toString(keySeriesStr.lastIndexOf("."))); + // log.info(Integer.toString(keySeriesStr.length() -1)); + if (keySeriesStr.lastIndexOf(".") == keySeriesStr.length() - 1) + keySeriesStr = keySeriesStr.substring(0, keySeriesStr.length() - 1); + String[] keySet = keySeriesStr.split("\\.", keySeriesStr.length()); + Object keySeriesObj = event; + for (int i = 0; i < (keySet.length); i++) { + // log.info( "getEventObject " + i + " ==" + keySet[i]); + if (keySeriesObj != null) { + if (keySeriesObj instanceof String) { + // keySeriesObj = keySeriesObj.get(keySet[i]); + log.info("STRING==" + keySeriesObj); + } else if (keySeriesObj instanceof JSONArray) { + keySeriesObj = ((JSONArray) keySeriesObj).optJSONObject(Integer.parseInt(keySet[i])); + // log.info("ARRAY==" + keySeriesObj); + } else if (keySeriesObj instanceof JSONObject) { + keySeriesObj = ((JSONObject) keySeriesObj).opt(keySet[i]); + // log.info("JSONObject==" + keySeriesObj); + } else { + log.info("unknown object==" + keySeriesObj); + } + } + } + + if (keySeriesObj == null) + return OBJECT_NOT_FOUND; + return keySeriesObj; + } + + public void setEventObjectVal(String keySeriesStr, Object value) { + setEventObjectVal(keySeriesStr, value, "string"); + } + + /** + * returns a string or JSONObject or JSONArray + **/ + public void setEventObjectVal(String keySeriesStr, Object value, String fieldType) { + keySeriesStr = keySeriesStr.replaceAll("\\[", "."); + keySeriesStr = keySeriesStr.replaceAll("\\]", "."); + if (keySeriesStr.contains("..")) { + keySeriesStr = keySeriesStr.replaceAll("\\.\\.", "."); + } + log.info("fieldType==" + fieldType); + // log.info(Integer.toString(keySeriesStr.lastIndexOf("."))); + // log.info(Integer.toString(keySeriesStr.length() -1)); + if (keySeriesStr.lastIndexOf(".") == keySeriesStr.length() - 1) + keySeriesStr = keySeriesStr.substring(0, keySeriesStr.length() - 1); + String[] keySet = keySeriesStr.split("\\.", keySeriesStr.length()); + Object keySeriesObj = event; + for (int i = 0; i < (keySet.length - 1); i++) { + // log.info( "setEventObject " + i + " ==" + keySet[i]); + if (keySeriesObj instanceof JSONArray) { + // keySeriesObj = ((JSONArray) + // keySeriesObj).optJSONObject(Integer.parseInt(keySet[i])); + if (((JSONArray) keySeriesObj).optJSONObject(Integer.parseInt(keySet[i])) == null) // if + // the + // object + // is + // not + // there + // then + // add + // it + { + log.info("Object is null, must add it"); + if (keySet[i + 1].matches("[0-9]*")) // if index then array + ((JSONArray) keySeriesObj).put(Integer.parseInt(keySet[i]), new JSONArray()); + else + ((JSONArray) keySeriesObj).put(Integer.parseInt(keySet[i]), new JSONObject()); } - else + keySeriesObj = ((JSONArray) keySeriesObj).optJSONObject(Integer.parseInt(keySet[i])); + // log.info("ARRAY==" + keySeriesObj); + } else if (keySeriesObj instanceof JSONObject) { + if (((JSONObject) keySeriesObj).opt(keySet[i]) == null) // if + // the + // object + // is + // not + // there + // then + // add + // it { - if(!(getEventObjectVal(key).toString().equals(filterValue))) - { - log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + "==false"); - return false; - } + if (keySet[i + 1].matches("[0-9]*")) // if index then array + ((JSONObject) keySeriesObj).put(keySet[i], new JSONArray()); + else + ((JSONObject) keySeriesObj).put(keySet[i], new JSONObject()); + log.info("Object is null, must add it"); } + keySeriesObj = ((JSONObject) keySeriesObj).opt(keySet[i]); + // log.info("JSONObject==" + keySeriesObj); + } else { + log.info("unknown object==" + keySeriesObj); } - return retVal; - } - /** - * - */ - public boolean isFilterMet(JSONObject jo) - { - boolean retval = true; - //log.info("Filter==" + jo.toString()); - for (String key : jo.keySet()) - { - if (key.equals("not")) - { - JSONObject njo = jo.getJSONObject(key); - for (String njoKey : njo.keySet()) - { - //log.info(njoKey); - retval = checkFilter(njo, njoKey, key); - if (retval == false) - return retval; - } - } - else - { - //log.info(key); - //final String filterKey = key; - retval = checkFilter(jo, key, key); - if (retval == false) - return retval; - } - } - return true; - } - - /** - * returns a string or JSONObject or JSONArray - **/ - public Object getEventObjectVal(String keySeriesStr) - { - keySeriesStr = keySeriesStr.replaceAll("\\[", "."); - keySeriesStr = keySeriesStr.replaceAll("\\]", "."); - if (keySeriesStr.contains("..")) - { - keySeriesStr = keySeriesStr.replaceAll("\\.\\.", "."); - } - //log.info(Integer.toString(keySeriesStr.lastIndexOf("."))); - //log.info(Integer.toString(keySeriesStr.length() -1)); - if (keySeriesStr.lastIndexOf(".") == keySeriesStr.length() -1 ) - keySeriesStr = keySeriesStr.substring(0,keySeriesStr.length()-1 ); - String[] keySet = keySeriesStr.split("\\.", keySeriesStr.length()); - Object keySeriesObj = event; - for (int i=0; i<(keySet.length); i++ ) - { - //log.info( "getEventObject " + i + " ==" + keySet[i]); - if (keySeriesObj != null) - { - if (keySeriesObj instanceof String) - { - //keySeriesObj = keySeriesObj.get(keySet[i]); - log.info("STRING==" + keySeriesObj); - } - else if (keySeriesObj instanceof JSONArray) { - keySeriesObj = ((JSONArray) keySeriesObj).optJSONObject(Integer.parseInt(keySet[i])); - //log.info("ARRAY==" + keySeriesObj); - } - else if (keySeriesObj instanceof JSONObject) { - keySeriesObj = ( (JSONObject) keySeriesObj).opt(keySet[i]); - //log.info("JSONObject==" + keySeriesObj); - } - else - { - log.info("unknown object==" + keySeriesObj); - } - } - } - - if (keySeriesObj == null) - return OBJECT_NOT_FOUND; - return keySeriesObj; - } - - public void setEventObjectVal(String keySeriesStr, Object value) - { - setEventObjectVal(keySeriesStr, value, "string"); - } - - /** - * returns a string or JSONObject or JSONArray - **/ - public void setEventObjectVal(String keySeriesStr, Object value, String fieldType) - { - keySeriesStr = keySeriesStr.replaceAll("\\[", "."); - keySeriesStr = keySeriesStr.replaceAll("\\]", "."); - if (keySeriesStr.contains("..")) - { - keySeriesStr = keySeriesStr.replaceAll("\\.\\.", "."); - } - log.info("fieldType==" + fieldType); - //log.info(Integer.toString(keySeriesStr.lastIndexOf("."))); - //log.info(Integer.toString(keySeriesStr.length() -1)); - if (keySeriesStr.lastIndexOf(".") == keySeriesStr.length() -1 ) - keySeriesStr = keySeriesStr.substring(0,keySeriesStr.length()-1 ); - String[] keySet = keySeriesStr.split("\\.", keySeriesStr.length()); - Object keySeriesObj = event; - for (int i=0; i<(keySet.length -1); i++ ) - { - //log.info( "setEventObject " + i + " ==" + keySet[i]); - if (keySeriesObj instanceof JSONArray) { - //keySeriesObj = ((JSONArray) keySeriesObj).optJSONObject(Integer.parseInt(keySet[i])); - if (((JSONArray) keySeriesObj).optJSONObject(Integer.parseInt(keySet[i])) == null) //if the object is not there then add it - { - log.info("Object is null, must add it"); - if (keySet[i+1].matches("[0-9]*")) // if index then array - ((JSONArray) keySeriesObj).put(Integer.parseInt(keySet[i]), new JSONArray()); - else - ((JSONArray) keySeriesObj).put(Integer.parseInt(keySet[i]), new JSONObject()); - } - keySeriesObj = ((JSONArray) keySeriesObj).optJSONObject(Integer.parseInt(keySet[i])); - //log.info("ARRAY==" + keySeriesObj); - } - else if (keySeriesObj instanceof JSONObject) { - if (( (JSONObject) keySeriesObj).opt(keySet[i]) == null) //if the object is not there then add it - { - if (keySet[i+1].matches("[0-9]*")) // if index then array - ((JSONObject) keySeriesObj).put(keySet[i], new JSONArray()); - else - ((JSONObject) keySeriesObj).put(keySet[i], new JSONObject()); - log.info("Object is null, must add it"); - } - keySeriesObj = ( (JSONObject) keySeriesObj).opt(keySet[i]); - //log.info("JSONObject==" + keySeriesObj); - } - else - { - log.info("unknown object==" + keySeriesObj); - } - } - if (fieldType.equals("number") ) - { - DecimalFormat df = new DecimalFormat("#.0"); - if (value instanceof String) - ((JSONObject)keySeriesObj).put(keySet[keySet.length -1], Float.valueOf(df.format(Float.valueOf((String) value)))); - else - ((JSONObject)keySeriesObj).put(keySet[keySet.length -1], Float.valueOf(df.format(value))); - } - else if (fieldType.equals("integer") && value instanceof String) - ((JSONObject)keySeriesObj).put(keySet[keySet.length -1], Integer.valueOf((String) value)); - else if (fieldType.equals("JArray")) - ((JSONArray)keySeriesObj).put( value); - else - ((JSONObject)keySeriesObj).put(keySet[keySet.length -1], value); - - } - private JSONObject event = new JSONObject(); -} + } + if (fieldType.equals("number")) { + DecimalFormat df = new DecimalFormat("#.0"); + if (value instanceof String) + ((JSONObject) keySeriesObj).put(keySet[keySet.length - 1], + Float.valueOf(df.format(Float.valueOf((String) value)))); + else + ((JSONObject) keySeriesObj).put(keySet[keySet.length - 1], Float.valueOf(df.format(value))); + } else if (fieldType.equals("integer") && value instanceof String) + ((JSONObject) keySeriesObj).put(keySet[keySet.length - 1], Integer.valueOf((String) value)); + else if (fieldType.equals("JArray")) + ((JSONArray) keySeriesObj).put(value); + else + ((JSONObject) keySeriesObj).put(keySet[keySet.length - 1], value); + } + + private JSONObject event = new JSONObject(); +} diff --git a/src/main/java/org/onap/dcae/commonFunction/CustomExceptionLoader.java b/src/main/java/org/onap/dcae/commonFunction/CustomExceptionLoader.java index fbeba2f6..2aec512f 100644 --- a/src/main/java/org/onap/dcae/commonFunction/CustomExceptionLoader.java +++ b/src/main/java/org/onap/dcae/commonFunction/CustomExceptionLoader.java @@ -39,89 +39,90 @@ import com.google.gson.JsonSyntaxException; public class CustomExceptionLoader { - protected static HashMap<String, JsonArray> map = null; - private static final Logger log = LoggerFactory.getLogger ( CustomExceptionLoader.class ); - - //For standalone test - //LoadMap Invoked from servletSetup - /* - public static void main(String[] args) { - - System.out.println("CustomExceptionLoader.main --> Arguments -- ExceptionConfig file: " + args[0] + "StatusCode:" + args[1]+ " Error Msg:" + args[2]); - CommonStartup.exceptionConfig = args[0]; - - //Read the Custom exception JSON file into map - LoadMap(); - System.out.println("CustomExceptionLoader.main --> Map info post LoadMap:" + map); - - String[] str= LookupMap(args[1],args[2]); - if (! (str==null)) { - System.out.println("CustomExceptionLoader.main --> Return from lookup function" + str[0] + "value:" + str[1]); + protected static HashMap<String, JsonArray> map = null; + private static final Logger log = LoggerFactory.getLogger(CustomExceptionLoader.class); + + // For standalone test + // LoadMap Invoked from servletSetup + /* + * public static void main(String[] args) { + * + * System.out. + * println("CustomExceptionLoader.main --> Arguments -- ExceptionConfig file: " + * + args[0] + "StatusCode:" + args[1]+ " Error Msg:" + args[2]); + * CommonStartup.exceptionConfig = args[0]; + * + * //Read the Custom exception JSON file into map LoadMap(); System.out. + * println("CustomExceptionLoader.main --> Map info post LoadMap:" + map); + * + * String[] str= LookupMap(args[1],args[2]); if (! (str==null)) { + * System.out. + * println("CustomExceptionLoader.main --> Return from lookup function" + + * str[0] + "value:" + str[1]); } + * + * } + */ + + public static void LoadMap() { + + map = new HashMap<String, JsonArray>(); + FileReader fr = null; + try { + JsonElement root = null; + fr = new FileReader(CommonStartup.exceptionConfig); + root = new JsonParser().parse(fr); + JsonObject jsonObject = root.getAsJsonObject().get("code").getAsJsonObject(); + + for (Entry<String, JsonElement> entry : jsonObject.entrySet()) { + map.put(entry.getKey(), (JsonArray) entry.getValue()); + } + + log.debug("CustomExceptionLoader.LoadMap --> Map loaded - " + map); + } catch (JsonIOException | JsonSyntaxException | FileNotFoundException e) { + log.error("Exception in LoadMap:" + e.getMessage()); + map = null; + } finally { + if (fr != null) { + try { + fr.close(); + } catch (IOException e) { + log.error("Error closing file reader stream : " + e.toString()); + map = null; + } + } } - } - */ - - public static void LoadMap () { - - map = new HashMap<String, JsonArray>(); - FileReader fr = null; - try { - JsonElement root = null; - fr = new FileReader(CommonStartup.exceptionConfig); - root = new JsonParser().parse(fr); - JsonObject jsonObject = root.getAsJsonObject().get("code").getAsJsonObject(); - - for (Entry<String, JsonElement> entry : jsonObject.entrySet()) { - map.put(entry.getKey(), (JsonArray) entry.getValue()); + + public static String[] LookupMap(String error, String errormsg) { + + String[] retarray = null; + + log.debug("CustomExceptionLoader.LookupMap -->" + " HTTP StatusCode:" + error + " Msg:" + errormsg); + try { + + JsonArray jarray = map.get(error); + for (int i = 0; i < jarray.size(); i++) { + + JsonElement val = jarray.get(i).getAsJsonObject().get("Reason"); + JsonArray ec = (JsonArray) jarray.get(i).getAsJsonObject().get("ErrorCode"); + log.trace("CustomExceptionLoader.LookupMap Parameter -> Error msg : " + errormsg + + " Reason text being matched:" + val); + if (errormsg.contains(val.toString().replace("\"", ""))) { + log.trace( + "CustomExceptionLoader.LookupMap Successful! Exception matched to error message StatusCode:" + + ec.get(0).toString() + "ErrorMessage:" + ec.get(1).toString()); + retarray = new String[2]; + retarray[0] = ec.get(0).toString(); + retarray[1] = ec.get(1).toString(); + return retarray; } - - log.debug("CustomExceptionLoader.LoadMap --> Map loaded - " + map); - } catch (JsonIOException|JsonSyntaxException|FileNotFoundException e) { - log.error("Exception in LoadMap:" + e.getMessage()); - map = null; } - finally { - if (fr != null) { - try { - fr.close(); - } catch (IOException e) { - log.error("Error closing file reader stream : " +e.toString()); - map = null; - } - } - } - } - public static String[] LookupMap (String error, String errormsg) { - - String[] retarray = null; - - log.debug("CustomExceptionLoader.LookupMap -->" + " HTTP StatusCode:" + error + " Msg:" + errormsg); - try{ - - JsonArray jarray = map.get(error); - for (int i = 0; i < jarray.size(); i++) { - - JsonElement val = jarray.get(i).getAsJsonObject().get("Reason"); - JsonArray ec = (JsonArray) jarray.get(i).getAsJsonObject().get("ErrorCode"); - log.trace("CustomExceptionLoader.LookupMap Parameter -> Error msg : " + errormsg + " Reason text being matched:" + val); - if (errormsg.contains(val.toString().replace("\"", ""))){ - log.trace("CustomExceptionLoader.LookupMap Successful! Exception matched to error message StatusCode:" + ec.get(0).toString() + "ErrorMessage:" + ec.get(1).toString()); - retarray = new String[2]; - retarray[0]=ec.get(0).toString(); - retarray[1]=ec.get(1).toString(); - return retarray; - } - } - - } - catch (Exception e) - { - System.out.println(e.getMessage()); - } - - return retarray; + } catch (Exception e) { + System.out.println(e.getMessage()); + } + + return retarray; } } diff --git a/src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java b/src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java index b10f5882..6ff24abf 100644 --- a/src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java +++ b/src/main/java/org/onap/dcae/commonFunction/DmaapPropertyReader.java @@ -52,7 +52,8 @@ public class DmaapPropertyReader { fr = new FileReader(CambriaConfigFile); root = new JsonParser().parse(fr); - //Check if dmaap config is handled by legacy controller/service manager + // Check if dmaap config is handled by legacy controller/service + // manager if (root.getAsJsonObject().has("channels")) { JsonArray jsonObject = (JsonArray) root.getAsJsonObject().get("channels"); @@ -88,13 +89,14 @@ public class DmaapPropertyReader { } } else { - //Handing new format from controllergen2/config_binding_service + // Handing new format from controllergen2/config_binding_service JsonObject jsonObject = root.getAsJsonObject(); Set<Map.Entry<String, JsonElement>> entries = jsonObject.entrySet(); for (Map.Entry<String, JsonElement> entry : entries) { - - JsonElement topicurl = entry.getValue().getAsJsonObject().get("dmaap_info").getAsJsonObject().get("topic_url"); + + JsonElement topicurl = entry.getValue().getAsJsonObject().get("dmaap_info").getAsJsonObject() + .get("topic_url"); String[] urlParts = dmaapUrlSplit(topicurl.toString().replace("\"", "")); String mrTopic = null; diff --git a/src/main/java/org/onap/dcae/commonFunction/EventProcessor.java b/src/main/java/org/onap/dcae/commonFunction/EventProcessor.java index 05e5f0ba..79dea790 100644 --- a/src/main/java/org/onap/dcae/commonFunction/EventProcessor.java +++ b/src/main/java/org/onap/dcae/commonFunction/EventProcessor.java @@ -42,154 +42,150 @@ import java.util.TimeZone; public class EventProcessor implements Runnable { - private static final Logger log = LoggerFactory.getLogger(EventProcessor.class); - private static final String EVENT_LITERAL = "event"; - private static final String COMMON_EVENT_HEADER = "commonEventHeader"; - - private static HashMap<String, String[]> streamid_hash = new HashMap<String, String[]>(); - public JSONObject event; - - public EventProcessor() { - log.debug("EventProcessor: Default Constructor"); - - String[] list = CommonStartup.streamid.split("\\|"); - for (String aList : list) { - String domain = aList.split("=")[0]; - //String streamIdList[] = list[i].split("=")[1].split(","); - String[] streamIdList = aList.substring(aList.indexOf('=') + 1).split(","); - - log.debug(String.format("Domain: %s streamIdList:%s", domain, - Arrays.toString(streamIdList))); - streamid_hash.put(domain, streamIdList); - } - - } - - @Override - public void run() { - - try { - - event = CommonStartup.fProcessingInputQueue.take(); - log.info("EventProcessor\tRemoving element: " + event); - - //EventPublisher Ep=new EventPublisher(); - while (event != null) { - // As long as the producer is running we remove elements from the queue. - - //UUID uuid = UUID.fromString(event.get("VESuniqueId").toString()); - String uuid = event.get("VESuniqueId").toString(); - LoggingContext localLC = VESLogger.getLoggingContextForThread(uuid); - localLC.put(EcompFields.kBeginTimestampMs, SaClock.now()); - - log.debug("event.VESuniqueId" + event.get("VESuniqueId") - + "event.commonEventHeader.domain:" + event.getJSONObject(EVENT_LITERAL) - .getJSONObject(COMMON_EVENT_HEADER).getString("domain")); - String[] streamIdList = streamid_hash.get( - event.getJSONObject(EVENT_LITERAL).getJSONObject(COMMON_EVENT_HEADER) - .getString("domain")); - log.debug("streamIdList:" + streamIdList); - - if (streamIdList.length == 0) { - log.error("No StreamID defined for publish - Message dropped" + event); - } else { - for (String aStreamIdList : streamIdList) { - log.info("Invoking publisher for streamId:" + aStreamIdList); - this.overrideEvent(); - EventPublisher.getInstance(aStreamIdList).sendEvent(event); - - } - } - log.debug("Message published" + event); - event = CommonStartup.fProcessingInputQueue.take(); - // log.info("EventProcessor\tRemoving element: " + this.queue.remove()); - } - } catch (InterruptedException e) { - log.error("EventProcessor InterruptedException" + e.getMessage()); - } - - } - - - @SuppressWarnings({"unchecked", "rawtypes"}) - public void overrideEvent() { - //Set collector timestamp in event payload before publish - final Date currentTime = new Date(); - final SimpleDateFormat sdf = new SimpleDateFormat("EEE, MM dd yyyy hh:mm:ss z"); - sdf.setTimeZone(TimeZone.getTimeZone("GMT")); - - JSONObject collectorTimeStamp = new JSONObject() - .put("collectorTimeStamp", sdf.format(currentTime)); - JSONObject commonEventHeaderkey = event.getJSONObject(EVENT_LITERAL) - .getJSONObject(COMMON_EVENT_HEADER); - commonEventHeaderkey.put("internalHeaderFields", collectorTimeStamp); - event.getJSONObject(EVENT_LITERAL).put(COMMON_EVENT_HEADER, commonEventHeaderkey); - - if (CommonStartup.eventTransformFlag == 1) { - // read the mapping json file - final JsonParser parser = new JsonParser(); - FileReader fr = null; - try { - fr = new FileReader ( "./etc/eventTransform.json" ); - final JsonArray jo = (JsonArray) parser.parse(fr); - log.info("parse eventTransform.json"); - // now convert to org.json - final String jsonText = jo.toString(); - final JSONArray topLevel = new JSONArray(jsonText); - //log.info("topLevel == " + topLevel); - - Class[] paramJSONObject = new Class[1]; - paramJSONObject[0] = JSONObject.class; - //load VESProcessors class at runtime - Class cls = Class.forName("org.onap.dcae.commonFunction.ConfigProcessors"); - Constructor constr = cls.getConstructor(paramJSONObject); - Object obj = constr.newInstance(event); - - for (int j = 0; j < topLevel.length(); j++) { - JSONObject filterObj = topLevel.getJSONObject(j).getJSONObject("filter"); - Method method = cls.getDeclaredMethod("isFilterMet", paramJSONObject); - boolean filterMet = (boolean) method.invoke(obj, filterObj); - if (filterMet) { - final JSONArray processors = topLevel.getJSONObject(j) - .getJSONArray("processors"); - - //call the processor method - for (int i = 0; i < processors.length(); i++) { - final JSONObject processorList = processors.getJSONObject(i); - final String functionName = processorList.getString("functionName"); - final JSONObject args = processorList.getJSONObject("args"); - //final JSONObject filter = processorList.getJSONObject("filter"); - - log.info(String.format("functionName==%s | args==%s", functionName, - args)); - //reflect method call - method = cls.getDeclaredMethod(functionName, paramJSONObject); - method.invoke(obj, args); - } - } - } - - } catch (Exception e) { - - log.error("EventProcessor Exception" + e.getMessage() + e + e.getCause() ); - } - finally { - //close the file - if (fr != null) { - try { - fr.close(); - } catch (IOException e) { - log.error("Error closing file reader stream : " + e.toString()); - } - - } - } + private static final Logger log = LoggerFactory.getLogger(EventProcessor.class); + private static final String EVENT_LITERAL = "event"; + private static final String COMMON_EVENT_HEADER = "commonEventHeader"; + + private static HashMap<String, String[]> streamid_hash = new HashMap<String, String[]>(); + public JSONObject event; + + public EventProcessor() { + log.debug("EventProcessor: Default Constructor"); + + String[] list = CommonStartup.streamid.split("\\|"); + for (String aList : list) { + String domain = aList.split("=")[0]; + // String streamIdList[] = list[i].split("=")[1].split(","); + String[] streamIdList = aList.substring(aList.indexOf('=') + 1).split(","); + + log.debug(String.format("Domain: %s streamIdList:%s", domain, Arrays.toString(streamIdList))); + streamid_hash.put(domain, streamIdList); + } + } - //Remove VESversion from event. This field is for internal use and must be removed after use. - if (event.has("VESversion")) - event.remove("VESversion"); - log.debug("Modified event:" + event); + @Override + public void run() { + + try { + + event = CommonStartup.fProcessingInputQueue.take(); + log.info("EventProcessor\tRemoving element: " + event); + + // EventPublisher Ep=new EventPublisher(); + while (event != null) { + // As long as the producer is running we remove elements from + // the queue. + + // UUID uuid = + // UUID.fromString(event.get("VESuniqueId").toString()); + String uuid = event.get("VESuniqueId").toString(); + LoggingContext localLC = VESLogger.getLoggingContextForThread(uuid); + localLC.put(EcompFields.kBeginTimestampMs, SaClock.now()); + + log.debug("event.VESuniqueId" + event.get("VESuniqueId") + "event.commonEventHeader.domain:" + + event.getJSONObject(EVENT_LITERAL).getJSONObject(COMMON_EVENT_HEADER).getString("domain")); + String[] streamIdList = streamid_hash + .get(event.getJSONObject(EVENT_LITERAL).getJSONObject(COMMON_EVENT_HEADER).getString("domain")); + log.debug("streamIdList:" + streamIdList); + + if (streamIdList.length == 0) { + log.error("No StreamID defined for publish - Message dropped" + event); + } else { + for (String aStreamIdList : streamIdList) { + log.info("Invoking publisher for streamId:" + aStreamIdList); + this.overrideEvent(); + EventPublisher.getInstance(aStreamIdList).sendEvent(event); + + } + } + log.debug("Message published" + event); + event = CommonStartup.fProcessingInputQueue.take(); + // log.info("EventProcessor\tRemoving element: " + + // this.queue.remove()); + } + } catch (InterruptedException e) { + log.error("EventProcessor InterruptedException" + e.getMessage()); + } - } + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + public void overrideEvent() { + // Set collector timestamp in event payload before publish + final Date currentTime = new Date(); + final SimpleDateFormat sdf = new SimpleDateFormat("EEE, MM dd yyyy hh:mm:ss z"); + sdf.setTimeZone(TimeZone.getTimeZone("GMT")); + + JSONObject collectorTimeStamp = new JSONObject().put("collectorTimeStamp", sdf.format(currentTime)); + JSONObject commonEventHeaderkey = event.getJSONObject(EVENT_LITERAL).getJSONObject(COMMON_EVENT_HEADER); + commonEventHeaderkey.put("internalHeaderFields", collectorTimeStamp); + event.getJSONObject(EVENT_LITERAL).put(COMMON_EVENT_HEADER, commonEventHeaderkey); + + if (CommonStartup.eventTransformFlag == 1) { + // read the mapping json file + final JsonParser parser = new JsonParser(); + FileReader fr = null; + try { + fr = new FileReader("./etc/eventTransform.json"); + final JsonArray jo = (JsonArray) parser.parse(fr); + log.info("parse eventTransform.json"); + // now convert to org.json + final String jsonText = jo.toString(); + final JSONArray topLevel = new JSONArray(jsonText); + // log.info("topLevel == " + topLevel); + + Class[] paramJSONObject = new Class[1]; + paramJSONObject[0] = JSONObject.class; + // load VESProcessors class at runtime + Class cls = Class.forName("org.onap.dcae.commonFunction.ConfigProcessors"); + Constructor constr = cls.getConstructor(paramJSONObject); + Object obj = constr.newInstance(event); + + for (int j = 0; j < topLevel.length(); j++) { + JSONObject filterObj = topLevel.getJSONObject(j).getJSONObject("filter"); + Method method = cls.getDeclaredMethod("isFilterMet", paramJSONObject); + boolean filterMet = (boolean) method.invoke(obj, filterObj); + if (filterMet) { + final JSONArray processors = topLevel.getJSONObject(j).getJSONArray("processors"); + + // call the processor method + for (int i = 0; i < processors.length(); i++) { + final JSONObject processorList = processors.getJSONObject(i); + final String functionName = processorList.getString("functionName"); + final JSONObject args = processorList.getJSONObject("args"); + // final JSONObject filter = + // processorList.getJSONObject("filter"); + + log.info(String.format("functionName==%s | args==%s", functionName, args)); + // reflect method call + method = cls.getDeclaredMethod(functionName, paramJSONObject); + method.invoke(obj, args); + } + } + } + + } catch (Exception e) { + + log.error("EventProcessor Exception" + e.getMessage() + e + e.getCause()); + } finally { + // close the file + if (fr != null) { + try { + fr.close(); + } catch (IOException e) { + log.error("Error closing file reader stream : " + e.toString()); + } + + } + } + } + // Remove VESversion from event. This field is for internal use and must + // be removed after use. + if (event.has("VESversion")) + event.remove("VESversion"); + + log.debug("Modified event:" + event); + + } } diff --git a/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java b/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java index d76299df..7dbb8f3c 100644 --- a/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java +++ b/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java @@ -34,147 +34,133 @@ import java.security.GeneralSecurityException; import java.util.List; import java.util.concurrent.TimeUnit; - public class EventPublisher { - private static final String VES_UNIQUE_ID = "VESuniqueId"; - private static EventPublisher instance; - private static CambriaBatchingPublisher pub; - - private String streamid = ""; - private String ueburl = ""; - private String topic = ""; - private String authuser = ""; - private String authpwd = ""; - - private static Logger log = LoggerFactory.getLogger(EventPublisher.class); - - - private EventPublisher(String newstreamid) { - - streamid = newstreamid; - try { - ueburl = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile).dmaap_hash - .get(streamid + ".cambria.url"); - - if (ueburl == null) { - ueburl = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile).dmaap_hash - .get(streamid + ".cambria.hosts"); - } - topic = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile) - .getKeyValue(streamid + ".cambria.topic"); - authuser = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile) - .getKeyValue(streamid + ".basicAuthUsername"); - - if (authuser != null) { - authpwd = DmaapPropertyReader - .getInstance(CommonStartup.cambriaConfigFile).dmaap_hash - .get(streamid + ".basicAuthPassword"); - } - } catch (Exception e) { - log.error("CambriaClientBuilders connection reader exception : " + e.getMessage()); - - } - - } - - - /** - * Returns event publisher - * - * @param streamid stream id - * @return event publisher - */ - public static synchronized EventPublisher getInstance(String streamid) { - if (instance == null) { - instance = new EventPublisher(streamid); - } - if (!instance.streamid.equals(streamid)) { - instance.closePublisher(); - instance = new EventPublisher(streamid); - } - return instance; - - } - - - /** - * - * @param event json object for event - */ - public synchronized void sendEvent(JSONObject event) { - - log.debug("EventPublisher.sendEvent: instance for publish is ready"); - - if (event.has(VES_UNIQUE_ID)) { - String uuid = event.get(VES_UNIQUE_ID).toString(); - LoggingContext localLC = VESLogger.getLoggingContextForThread(uuid); - localLC.put(EcompFields.kBeginTimestampMs, SaClock.now()); - log.debug("Removing VESuniqueid object from event"); - event.remove(VES_UNIQUE_ID); - } - - try { - - if (authuser != null) { - log.debug(String.format("URL:%sTOPIC:%sAuthUser:%sAuthpwd:%s", ueburl, topic, - authuser, authpwd)); - pub = new CambriaClientBuilders.PublisherBuilder() - .usingHosts(ueburl) - .onTopic(topic) - .usingHttps() - .authenticatedByHttp(authuser, authpwd) - .logSendFailuresAfter(5) - // .logTo(log) - // .limitBatch(100, 10) - .build(); - } else { - - log.debug(String.format("URL:%sTOPIC:%s", ueburl, topic)); - pub = new CambriaClientBuilders.PublisherBuilder() - .usingHosts(ueburl) - .onTopic(topic) - // .logTo(log) - .logSendFailuresAfter(5) - // .limitBatch(100, 10) - .build(); - - } - - int pendingMsgs = pub.send("MyPartitionKey", event.toString()); - //this.wait(2000); - - if (pendingMsgs > 100) { - log.info("Pending Message Count=" + pendingMsgs); - } - - closePublisher(); - log.info("pub.send invoked - no error"); - CommonStartup.oplog.info(String.format("URL:%sTOPIC:%sEvent Published:%s", - ueburl, topic, event)); - - } catch (IOException | GeneralSecurityException | IllegalArgumentException e) { - log.error("Unable to publish event: {} streamid: {}. Exception: {}", event, streamid, e); - } - finally { - closePublisher(); + private static final String VES_UNIQUE_ID = "VESuniqueId"; + private static EventPublisher instance; + private static CambriaBatchingPublisher pub; + + private String streamid = ""; + private String ueburl = ""; + private String topic = ""; + private String authuser = ""; + private String authpwd = ""; + + private static Logger log = LoggerFactory.getLogger(EventPublisher.class); + + private EventPublisher(String newstreamid) { + + streamid = newstreamid; + try { + ueburl = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile).dmaap_hash + .get(streamid + ".cambria.url"); + + if (ueburl == null) { + ueburl = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile).dmaap_hash + .get(streamid + ".cambria.hosts"); + } + topic = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile) + .getKeyValue(streamid + ".cambria.topic"); + authuser = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile) + .getKeyValue(streamid + ".basicAuthUsername"); + + if (authuser != null) { + authpwd = DmaapPropertyReader.getInstance(CommonStartup.cambriaConfigFile).dmaap_hash + .get(streamid + ".basicAuthPassword"); + } + } catch (Exception e) { + log.error("CambriaClientBuilders connection reader exception : " + e.getMessage()); + + } + + } + + /** + * Returns event publisher + * + * @param streamid + * stream id + * @return event publisher + */ + public static synchronized EventPublisher getInstance(String streamid) { + if (instance == null) { + instance = new EventPublisher(streamid); + } + if (!instance.streamid.equals(streamid)) { + instance.closePublisher(); + instance = new EventPublisher(streamid); + } + return instance; + } - } + /** + * + * @param event + * json object for event + */ + public synchronized void sendEvent(JSONObject event) { + + log.debug("EventPublisher.sendEvent: instance for publish is ready"); + + if (event.has(VES_UNIQUE_ID)) { + String uuid = event.get(VES_UNIQUE_ID).toString(); + LoggingContext localLC = VESLogger.getLoggingContextForThread(uuid); + localLC.put(EcompFields.kBeginTimestampMs, SaClock.now()); + log.debug("Removing VESuniqueid object from event"); + event.remove(VES_UNIQUE_ID); + } + + try { + + if (authuser != null) { + log.debug(String.format("URL:%sTOPIC:%sAuthUser:%sAuthpwd:%s", ueburl, topic, authuser, authpwd)); + pub = new CambriaClientBuilders.PublisherBuilder().usingHosts(ueburl).onTopic(topic).usingHttps() + .authenticatedByHttp(authuser, authpwd).logSendFailuresAfter(5) + // .logTo(log) + // .limitBatch(100, 10) + .build(); + } else { + + log.debug(String.format("URL:%sTOPIC:%s", ueburl, topic)); + pub = new CambriaClientBuilders.PublisherBuilder().usingHosts(ueburl).onTopic(topic) + // .logTo(log) + .logSendFailuresAfter(5) + // .limitBatch(100, 10) + .build(); + + } + + int pendingMsgs = pub.send("MyPartitionKey", event.toString()); + // this.wait(2000); + + if (pendingMsgs > 100) { + log.info("Pending Message Count=" + pendingMsgs); + } + + log.info("pub.send invoked - no error"); + CommonStartup.oplog.info(String.format("URL:%sTOPIC:%sEvent Published:%s", ueburl, topic, event)); + + } catch (IOException | GeneralSecurityException | IllegalArgumentException e) { + log.error("Unable to publish event: {} streamid: {}. Exception: {}", event, streamid, e); + } finally { + closePublisher(); + } + } - public synchronized void closePublisher() { + public synchronized void closePublisher() { - try { - if (pub != null) { - final List<?> stuck = pub.close(20, TimeUnit.SECONDS); - if (!stuck.isEmpty()) { - log.error(stuck.size() + " messages unsent"); - } - } - } catch (InterruptedException | IOException e) { - log.error("Caught Exception on Close event: {}", e); - } + try { + if (pub != null) { + final List<?> stuck = pub.close(20, TimeUnit.SECONDS); + if (!stuck.isEmpty()) { + log.error(stuck.size() + " messages unsent"); + } + } + } catch (InterruptedException | IOException e) { + log.error("Caught Exception on Close event: {}", e); + } - } + } } diff --git a/src/main/java/org/onap/dcae/commonFunction/VESLogger.java b/src/main/java/org/onap/dcae/commonFunction/VESLogger.java index 79108443..8902a47c 100644 --- a/src/main/java/org/onap/dcae/commonFunction/VESLogger.java +++ b/src/main/java/org/onap/dcae/commonFunction/VESLogger.java @@ -33,126 +33,130 @@ import java.net.InetAddress; import java.net.UnknownHostException; import java.util.UUID; - public class VESLogger { - public static final String VES_AGENT = "VES_AGENT"; - private static final String REQUEST_ID = "requestId"; - private static final String IP_ADDRESS ="127.0.0.1"; - private static final String HOST_NAME="localhost"; - - public static Logger auditLog; - public static Logger metricsLog; - public static Logger errorLog; - public static Logger debugLog; - - // Common LoggingContext - private static LoggingContext commonLC; - // Thread-specific LoggingContext - private static LoggingContext threadLC; - public LoggingContext lc; - - - /** - * Returns the common LoggingContext instance that is the base context - * for all subsequent instances. - * - * @return the common LoggingContext - */ - public static LoggingContext getCommonLoggingContext() { - if (commonLC == null) { - commonLC = new LoggingContextFactory.Builder().build(); - final UUID uuid = UUID.randomUUID(); - - commonLC.put(REQUEST_ID, uuid.toString()); - } - return commonLC; - } - - /** - * Get a logging context for the current thread that's based on the common logging context. - * Populate the context with context-specific values. - * - * @param aUuid uuid for request id - * @return a LoggingContext for the current thread - */ - public static LoggingContext getLoggingContextForThread(UUID aUuid) { - // note that this operation requires everything from the common context - // to be (re)copied into the target context. That seems slow, but it actually - // helps prevent the thread from overwriting supposedly common data. It also - // should be fairly quick compared with the overhead of handling the actual - // service call. - - threadLC = new LoggingContextFactory.Builder(). - withBaseContext(getCommonLoggingContext()). - build(); - // Establish the request-specific UUID, as long as we are here... - threadLC.put(REQUEST_ID, aUuid.toString()); - threadLC.put(EcompFields.kEndTimestamp, SaClock.now()); - - return threadLC; - } - - /** - * Get a logging context for the current thread that's based on the common logging context. - * Populate the context with context-specific values. - * - * @param aUuid uuid for request id - * @return a LoggingContext for the current thread - */ - public static LoggingContext getLoggingContextForThread(String aUuid) { - // note that this operation requires everything from the common context - // to be (re)copied into the target context. That seems slow, but it actually - // helps prevent the thread from overwriting supposedly common data. It also - // should be fairly quick compared with the overhead of handling the actual - // service call. - - threadLC = new LoggingContextFactory.Builder(). - withBaseContext(getCommonLoggingContext()). - build(); - // Establish the request-specific UUID, as long as we are here... - threadLC.put(REQUEST_ID, aUuid); - threadLC.put("statusCode", "COMPLETE"); - threadLC.put(EcompFields.kEndTimestamp, SaClock.now()); - return threadLC; - } - - public static void setUpEcompLogging() { - - // Create ECOMP Logger instances - auditLog = LoggerFactory.getLogger("com.att.ecomp.audit"); - metricsLog = LoggerFactory.getLogger("com.att.ecomp.metrics"); - debugLog = LoggerFactory.getLogger("com.att.ecomp.debug"); - errorLog = LoggerFactory.getLogger("com.att.ecomp.error"); - - final LoggingContext lc = getCommonLoggingContext(); - - String ipAddr = IP_ADDRESS; - String hostname = HOST_NAME; - try { - final InetAddress ip = InetAddress.getLocalHost(); - hostname = ip.getCanonicalHostName(); - ipAddr = ip.getHostAddress(); - } catch (UnknownHostException x) { - Log.debug(x.getMessage()); - } - - lc.put("serverName", hostname); - lc.put("serviceName", "VESCollecor"); - lc.put("statusCode", "RUNNING"); - lc.put("targetEntity", "NULL"); - lc.put("targetServiceName", "NULL"); - lc.put("server", hostname); - lc.put("serverIpAddress", ipAddr); - - // instance UUID is meaningless here, so we just create a new one each time the - // server starts. One could argue each new instantiation of the service should - // have a new instance ID. - lc.put("instanceUuid", ""); - lc.put("severity", ""); - lc.put(EcompFields.kEndTimestamp, SaClock.now()); - lc.put("EndTimestamp", SaClock.now()); - lc.put("partnerName", "NA"); - } + public static final String VES_AGENT = "VES_AGENT"; + private static final String REQUEST_ID = "requestId"; + private static final String IP_ADDRESS = "127.0.0.1"; + private static final String HOST_NAME = "localhost"; + + public static Logger auditLog; + public static Logger metricsLog; + public static Logger errorLog; + public static Logger debugLog; + + // Common LoggingContext + private static LoggingContext commonLC; + // Thread-specific LoggingContext + private static LoggingContext threadLC; + public LoggingContext lc; + + /** + * Returns the common LoggingContext instance that is the base context for + * all subsequent instances. + * + * @return the common LoggingContext + */ + public static LoggingContext getCommonLoggingContext() { + if (commonLC == null) { + commonLC = new LoggingContextFactory.Builder().build(); + final UUID uuid = UUID.randomUUID(); + + commonLC.put(REQUEST_ID, uuid.toString()); + } + return commonLC; + } + + /** + * Get a logging context for the current thread that's based on the common + * logging context. Populate the context with context-specific values. + * + * @param aUuid + * uuid for request id + * @return a LoggingContext for the current thread + */ + public static LoggingContext getLoggingContextForThread(UUID aUuid) { + // note that this operation requires everything from the common context + // to be (re)copied into the target context. That seems slow, but it + // actually + // helps prevent the thread from overwriting supposedly common data. It + // also + // should be fairly quick compared with the overhead of handling the + // actual + // service call. + + threadLC = new LoggingContextFactory.Builder().withBaseContext(getCommonLoggingContext()).build(); + // Establish the request-specific UUID, as long as we are here... + threadLC.put(REQUEST_ID, aUuid.toString()); + threadLC.put(EcompFields.kEndTimestamp, SaClock.now()); + + return threadLC; + } + + /** + * Get a logging context for the current thread that's based on the common + * logging context. Populate the context with context-specific values. + * + * @param aUuid + * uuid for request id + * @return a LoggingContext for the current thread + */ + public static LoggingContext getLoggingContextForThread(String aUuid) { + // note that this operation requires everything from the common context + // to be (re)copied into the target context. That seems slow, but it + // actually + // helps prevent the thread from overwriting supposedly common data. It + // also + // should be fairly quick compared with the overhead of handling the + // actual + // service call. + + threadLC = new LoggingContextFactory.Builder().withBaseContext(getCommonLoggingContext()).build(); + // Establish the request-specific UUID, as long as we are here... + threadLC.put(REQUEST_ID, aUuid); + threadLC.put("statusCode", "COMPLETE"); + threadLC.put(EcompFields.kEndTimestamp, SaClock.now()); + return threadLC; + } + + public static void setUpEcompLogging() { + + // Create ECOMP Logger instances + auditLog = LoggerFactory.getLogger("com.att.ecomp.audit"); + metricsLog = LoggerFactory.getLogger("com.att.ecomp.metrics"); + debugLog = LoggerFactory.getLogger("com.att.ecomp.debug"); + errorLog = LoggerFactory.getLogger("com.att.ecomp.error"); + + final LoggingContext lc = getCommonLoggingContext(); + + String ipAddr = IP_ADDRESS; + String hostname = HOST_NAME; + try { + final InetAddress ip = InetAddress.getLocalHost(); + hostname = ip.getCanonicalHostName(); + ipAddr = ip.getHostAddress(); + } catch (UnknownHostException x) { + Log.debug(x.getMessage()); + } + + lc.put("serverName", hostname); + lc.put("serviceName", "VESCollecor"); + lc.put("statusCode", "RUNNING"); + lc.put("targetEntity", "NULL"); + lc.put("targetServiceName", "NULL"); + lc.put("server", hostname); + lc.put("serverIpAddress", ipAddr); + + // instance UUID is meaningless here, so we just create a new one each + // time the + // server starts. One could argue each new instantiation of the service + // should + // have a new instance ID. + lc.put("instanceUuid", ""); + lc.put("severity", ""); + lc.put(EcompFields.kEndTimestamp, SaClock.now()); + lc.put("EndTimestamp", SaClock.now()); + lc.put("partnerName", "NA"); + } } diff --git a/src/main/java/org/onap/dcae/controller/FetchDynamicConfig.java b/src/main/java/org/onap/dcae/controller/FetchDynamicConfig.java index 655b9755..82d4bba3 100644 --- a/src/main/java/org/onap/dcae/controller/FetchDynamicConfig.java +++ b/src/main/java/org/onap/dcae/controller/FetchDynamicConfig.java @@ -34,87 +34,82 @@ import java.util.Map; public class FetchDynamicConfig { - private static final Logger log = LoggerFactory.getLogger(FetchDynamicConfig.class); - - static String configFile = "/opt/app/KV-Configuration.json"; - static String url; - static String retString; - - public FetchDynamicConfig() { - } - - public static void main(String[] args) { - Map<String, String> env = System.getenv(); - for (Map.Entry<String, String> entry : env.entrySet()) { - log.info("%s=%s%n", entry.getKey(), entry.getValue()); - } - - if (env.containsKey("CONSUL_HOST") && env.containsKey("CONFIG_BINDING_SERVICE") - && env.containsKey("HOSTNAME")) { - log.info(">>>Dynamic configuration to be fetched from ConfigBindingService"); - url = env.get("CONSUL_HOST") + ":8500/v1/catalog/service/" + env - .get("CONFIG_BINDING_SERVICE"); - - retString = executecurl(url); - // consul return as array - JSONTokener temp = new JSONTokener(retString); - JSONObject cbsjobj = (JSONObject) new JSONArray(temp).get(0); - - String urlPart1 = null; - if (cbsjobj.has("ServiceAddress") && cbsjobj.has("ServicePort")) { - urlPart1 = - cbsjobj.getString("ServiceAddress") + ":" + cbsjobj.getInt("ServicePort"); - } - - log.info("CONFIG_BINDING_SERVICE DNS RESOLVED:" + urlPart1); - url = urlPart1 + "/service_component/" + env.get("HOSTNAME"); - retString = executecurl(url); - - JSONObject jsonObject = new JSONObject(new JSONTokener(retString)); - try (FileWriter file = new FileWriter(configFile)) { - file.write(jsonObject.toString()); - - log.info( - "Successfully Copied JSON Object to file /opt/app/KV-Configuration.json"); - } catch (IOException e) { - log.error( - "Error in writing configuration into file /opt/app/KV-Configuration.json " - + jsonObject, e); - e.printStackTrace(); - } - } else { - log.info(">>>Static configuration to be used"); - } - - } - - public static String executecurl(String url) { - - String[] command = {"curl", "-v", url}; - ProcessBuilder process = new ProcessBuilder(command); - Process p; - String result = null; - try { - p = process.start(); - InputStreamReader ipr = new InputStreamReader(p.getInputStream()); - BufferedReader reader = new BufferedReader(ipr); - StringBuilder builder = new StringBuilder(); - String line; - - while ((line = reader.readLine()) != null) { - builder.append(line); - } - result = builder.toString(); - log.info(result); - - reader.close(); - ipr.close(); - } catch (IOException e) { - log.error("error", e); - e.printStackTrace(); - } - return result; - - } + private static final Logger log = LoggerFactory.getLogger(FetchDynamicConfig.class); + + static String configFile = "/opt/app/KV-Configuration.json"; + static String url; + static String retString; + + public FetchDynamicConfig() { + } + + public static void main(String[] args) { + Map<String, String> env = System.getenv(); + for (Map.Entry<String, String> entry : env.entrySet()) { + log.info("%s=%s%n", entry.getKey(), entry.getValue()); + } + + if (env.containsKey("CONSUL_HOST") && env.containsKey("CONFIG_BINDING_SERVICE") + && env.containsKey("HOSTNAME")) { + log.info(">>>Dynamic configuration to be fetched from ConfigBindingService"); + url = env.get("CONSUL_HOST") + ":8500/v1/catalog/service/" + env.get("CONFIG_BINDING_SERVICE"); + + retString = executecurl(url); + // consul return as array + JSONTokener temp = new JSONTokener(retString); + JSONObject cbsjobj = (JSONObject) new JSONArray(temp).get(0); + + String urlPart1 = null; + if (cbsjobj.has("ServiceAddress") && cbsjobj.has("ServicePort")) { + urlPart1 = cbsjobj.getString("ServiceAddress") + ":" + cbsjobj.getInt("ServicePort"); + } + + log.info("CONFIG_BINDING_SERVICE DNS RESOLVED:" + urlPart1); + url = urlPart1 + "/service_component/" + env.get("HOSTNAME"); + retString = executecurl(url); + + JSONObject jsonObject = new JSONObject(new JSONTokener(retString)); + try (FileWriter file = new FileWriter(configFile)) { + file.write(jsonObject.toString()); + + log.info("Successfully Copied JSON Object to file /opt/app/KV-Configuration.json"); + } catch (IOException e) { + log.error("Error in writing configuration into file /opt/app/KV-Configuration.json " + jsonObject, e); + e.printStackTrace(); + } + } else { + log.info(">>>Static configuration to be used"); + } + + } + + public static String executecurl(String url) { + + String[] command = { "curl", "-v", url }; + ProcessBuilder process = new ProcessBuilder(command); + Process p; + String result = null; + try { + p = process.start(); + InputStreamReader ipr = new InputStreamReader(p.getInputStream()); + BufferedReader reader = new BufferedReader(ipr); + StringBuilder builder = new StringBuilder(); + String line; + + while ((line = reader.readLine()) != null) { + builder.append(line); + } + result = builder.toString(); + log.info(result); + + reader.close(); + ipr.close(); + } catch (IOException e) { + log.error("error", e); + e.printStackTrace(); + } + return result; + + } } diff --git a/src/main/java/org/onap/dcae/controller/LoadDynamicConfig.java b/src/main/java/org/onap/dcae/controller/LoadDynamicConfig.java index 1f77751d..2db4ff42 100644 --- a/src/main/java/org/onap/dcae/controller/LoadDynamicConfig.java +++ b/src/main/java/org/onap/dcae/controller/LoadDynamicConfig.java @@ -34,91 +34,87 @@ import java.io.InputStreamReader; import java.util.Iterator; import java.util.Map; - public class LoadDynamicConfig { - private static final Logger log = LoggerFactory.getLogger(LoadDynamicConfig.class); - - public String propFile = "collector.properties"; - public String configFile = "/opt/app/KV-Configuration.json"; - static String url; - static String retString; - - public LoadDynamicConfig() { - - } - - public static void main(String[] args) { - Map<String, String> env = System.getenv(); - - //Check again to ensure new controller deployment related config - if (env.containsKey("CONSUL_HOST") && - env.containsKey("CONFIG_BINDING_SERVICE") && env.containsKey("HOSTNAME")) { - - try { - - LoadDynamicConfig lc = new LoadDynamicConfig(); - String jsonData = readFile(lc.configFile); - JSONObject jsonObject = new JSONObject(jsonData); - - PropertiesConfiguration conf; - conf = new PropertiesConfiguration(lc.propFile); - conf.setEncoding(null); - - // update properties based on consul dynamic configuration - Iterator<?> keys = jsonObject.keys(); - - while (keys.hasNext()) { - String key = (String) keys.next(); - // check if any configuration is related to dmaap - // and write into dmaapconfig.json - if (key.startsWith("streams_publishes")) { - //VESCollector only have publish streams - try (FileWriter file = new FileWriter("./etc/DmaapConfig.json")) { - file.write(jsonObject.get(key).toString()); - log.info("Successfully written JSON Object to DmaapConfig.json"); - file.close(); - } catch (IOException e) { - log.info( - "Error in writing dmaap configuration into DmaapConfig.json", - e); - } - } else { - conf.setProperty(key, jsonObject.get(key).toString()); - } - - } - conf.save(); - - } catch (ConfigurationException e) { - log.error(e.getLocalizedMessage(), e); - e.printStackTrace(); - - } - - } else { - log.info(">>>Static configuration to be used"); - } - - } - - public static String readFile(String filename) { - String result = ""; - try (BufferedReader br = new BufferedReader(new FileReader(filename))) { - StringBuilder sb = new StringBuilder(); - String line = br.readLine(); - while (line != null) { - sb.append(line); - line = br.readLine(); - } - result = sb.toString(); - br.close(); - } catch (Exception e) { - log.error(e.getLocalizedMessage(), e); - e.printStackTrace(); - } - return result; - } - + private static final Logger log = LoggerFactory.getLogger(LoadDynamicConfig.class); + + public String propFile = "collector.properties"; + public String configFile = "/opt/app/KV-Configuration.json"; + static String url; + static String retString; + + public LoadDynamicConfig() { + + } + + public static void main(String[] args) { + Map<String, String> env = System.getenv(); + + // Check again to ensure new controller deployment related config + if (env.containsKey("CONSUL_HOST") && env.containsKey("CONFIG_BINDING_SERVICE") + && env.containsKey("HOSTNAME")) { + + try { + + LoadDynamicConfig lc = new LoadDynamicConfig(); + String jsonData = readFile(lc.configFile); + JSONObject jsonObject = new JSONObject(jsonData); + + PropertiesConfiguration conf; + conf = new PropertiesConfiguration(lc.propFile); + conf.setEncoding(null); + + // update properties based on consul dynamic configuration + Iterator<?> keys = jsonObject.keys(); + + while (keys.hasNext()) { + String key = (String) keys.next(); + // check if any configuration is related to dmaap + // and write into dmaapconfig.json + if (key.startsWith("streams_publishes")) { + // VESCollector only have publish streams + try (FileWriter file = new FileWriter("./etc/DmaapConfig.json")) { + file.write(jsonObject.get(key).toString()); + log.info("Successfully written JSON Object to DmaapConfig.json"); + file.close(); + } catch (IOException e) { + log.info("Error in writing dmaap configuration into DmaapConfig.json", e); + } + } else { + conf.setProperty(key, jsonObject.get(key).toString()); + } + + } + conf.save(); + + } catch (ConfigurationException e) { + log.error(e.getLocalizedMessage(), e); + e.printStackTrace(); + + } + + } else { + log.info(">>>Static configuration to be used"); + } + + } + + public static String readFile(String filename) { + String result = ""; + try (BufferedReader br = new BufferedReader(new FileReader(filename))) { + StringBuilder sb = new StringBuilder(); + String line = br.readLine(); + while (line != null) { + sb.append(line); + line = br.readLine(); + } + result = sb.toString(); + br.close(); + } catch (Exception e) { + log.error(e.getLocalizedMessage(), e); + e.printStackTrace(); + } + return result; + } } |