diff options
Diffstat (limited to 'dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef')
6 files changed, 480 insertions, 2 deletions
diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/CommonEventHeaderV7.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/CommonEventHeaderV7.java new file mode 100644 index 0000000..7c69fc4 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/CommonEventHeaderV7.java @@ -0,0 +1,139 @@ +/* + ** ============LICENSE_START======================================================= + ** Copyright (c) 2022 Wipro Limited. All rights reserved. + ** ================================================================================ + ** 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 + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** 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. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + ** + **/ + +package org.onap.dcae.analytics.model.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Fields common to all Events + * + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class CommonEventHeaderV7 extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * The eventing domain associated with this event + */ + + private Domain domain; + + /** + * Event key that is unique to the event source + */ + + private String eventId; + + /** + * Unique event name + */ + + private String eventName; + + /** + * Event type e.g. applicationVnf, guestOS, hostOS, platform + */ + + private String eventType; + + /** + * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources + */ + + private InternalHeaderFields internalHeaderFields; + + /** + * 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 + */ + + private Long lastEpochMicrosec; + + /** + * Three character network function component type as aligned with vfc naming standards + */ + + private String nfcNamingCode; + + /** + * Four character network function type as aligned with vnf naming standards + */ + + private String nfNamingCode; + + /** + * Processing Priority + */ + + private Priority priority; + + /** + * UUID identifying the entity reporting the event, for example an OAM VM; must be populated by the + * enrichment process + */ + + private String reportingEntityId; + + /** + * Name of the entity reporting the event, for example, an EMS name; may be the same as sourceName + */ + + private String reportingEntityName; + + /** + * Ordering of events communicated by an event source instance or 0 if not needed + */ + + private Integer sequence; + + /** + * UUID identifying the entity experiencing the event issue; must be populated by the enrichment process + */ + + private String sourceId; + + /** + * Name of the entity experiencing the event issue + */ + + private String sourceName; + + /** + * The earliest unix time aka epoch time associated with the event from any component--as microseconds elapsed + * since 1 Jan 1970 not including leap seconds + */ + + private Long startEpochMicrosec; + + /** + * Version of the event header + */ + + private String version; + + /** + * Version of the VES event listener version + */ + + private String vesEventListenerVersion; +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Domain.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Domain.java index 2be00dc..bcb9c64 100644 --- a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Domain.java +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Domain.java @@ -1,6 +1,7 @@ /* - * ================================================================================ + * ============LICENSE_START======================================================= * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2022 Wipro Limited Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +32,7 @@ public enum Domain implements CEFModel { measurementsForVfScaling, mobileFlow, other, + measurement, sipSignaling, stateChange, syslog, diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventListener.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventListener.java index 50bf3d1..3f32b7b 100644 --- a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventListener.java +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventListener.java @@ -1,6 +1,7 @@ /* - * ================================================================================ + * ============LICENSE_START======================================================= * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2022 Wipro Limited Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,4 +39,5 @@ public class EventListener extends BaseCEFModel { * Common Event Format - Event */ private Event event; + private EventV7 eventV7; } diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventV7.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventV7.java new file mode 100644 index 0000000..a4324a0 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventV7.java @@ -0,0 +1,50 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (c) 2022 Wipro Limited Intellectual Property. All rights reserved. + * ================================================================================ + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ + +package org.onap.dcae.analytics.model.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Generic Event Format + * + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class EventV7 extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * Fields common to all Events + */ + private CommonEventHeaderV7 commonEventHeader; + + /** + * Measurements for Vf scaling fields + */ + private MeasurementFields measurementFields; + + /** + * Threshold crossing alert Fields. + */ + private ThresholdCrossingAlertFields thresholdCrossingAlertFields; +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/MeasurementFields.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/MeasurementFields.java new file mode 100644 index 0000000..37f98e0 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/MeasurementFields.java @@ -0,0 +1,69 @@ +/* + ** ============LICENSE_START======================================================= + ** Copyright (c) 2022 Wipro Limited Intellectual Property. All rights reserved. + ** ================================================================================ + ** 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 + ** + ** http://www.apache.org/licenses/LICENSE-2.0 + ** + ** 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. + ** See the License for the specific language governing permissions and + ** limitations under the License. + ** ============LICENSE_END========================================================= + ** + **/ + +package org.onap.dcae.analytics.model.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * Common Event Format - Measurement fields + * + */ + +@Data +@EqualsAndHashCode(callSuper = true) +public class MeasurementFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Additional name-value-pair fields + */ + + private List<Field> additionalFields; + + /** + * Array of named name-value-pair arrays for additional Measurements + */ + + private List<NamedArrayOfFields> additionalMeasurements; + + /** + * Interval over which measurements are being reported in seconds + */ + + private Long measurementInterval; + + /** + * Version of the measurementsForVfScaling block + */ + + private String measurementFieldsVersion; + + /** + * Usage of an array of virtual network interface cards + */ + + private List<NicPerformance> nicPerformanceArray; + +} + diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/NicPerformance.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/NicPerformance.java new file mode 100644 index 0000000..7472e65 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/NicPerformance.java @@ -0,0 +1,216 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (c) 2022 Wipro Limited Intellectual Property. All rights reserved. + * ================================================================================ + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ + +package org.onap.dcae.analytics.model.cef; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * Describes the performance and errors of an identified virtual network interface card + * + * */ +@Data +@EqualsAndHashCode(callSuper = true) +public class NicPerformance extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Cumulative count of broadcast packets received as read at the end of the measurement interval + */ + + private Long receivedBroadcastPacketsAccumulated; + + /** + * Count of broadcast packets received within the measurement interval + */ + + private Long receivedBroadcastPacketsDelta; + + /** + * Cumulative count of discarded packets received as read at the end of the measurement interval + */ + + private Long receivedDiscardedPacketsAccumulated; + + /** + * Count of discarded packets received within the measurement interval + */ + + private Long receivedDiscardedPacketsDelta; + + /** + * Cumulative count of error packets received as read at the end of the measurement interval + */ + + private Long receivedErrorPacketsAccumulated; + + /** + * Count of error packets received within the measurement interval + */ + + private Long receivedErrorPacketsDelta; + + /** + * Cumulative count of multicast packets received as read at the end of the measurement interval + */ + + private Long receivedMulticastPacketsAccumulated; + + /** + * Count of multicast packets received within the measurement interval + */ + + private Long receivedMulticastPacketsDelta; + + /** + * Cumulative count of octets received as read at the end of the measurement interval + */ + + private Long receivedOctetsAccumulated; + + /** + * Count of octets received within the measurement interval + */ + + private Long receivedOctetsDelta; + + /** + * Cumulative count of all packets received as read at the end of the measurement interval + */ + + private Long receivedTotalPacketsAccumulated; + + /** + * Count of all packets received within the measurement interval + */ + + private Long receivedTotalPacketsDelta; + + /** + * Cumulative count of unicast packets received as read at the end of the measurement interval + */ + + private Long receivedUnicastPacketsAccumulated; + + /** + * Count of unicast packets received within the measurement interval + */ + + private Long receivedUnicastPacketsDelta; + + /** + * Cumulative count of broadcast packets transmitted as read at the end of the measurement interval + */ + + private Long transmittedBroadcastPacketsAccumulated; + + /** + * Count of broadcast packets transmitted within the measurement interval + */ + + private Long transmittedBroadcastPacketsDelta; + + /** + * Cumulative count of discarded packets transmitted as read at the end of the measurement interval + */ + + private Long transmittedDiscardedPacketsAccumulated; + + /** + * Count of discarded packets transmitted within the measurement interval + */ + + private Long transmittedDiscardedPacketsDelta; + + /** + * Cumulative count of error packets transmitted as read at the end of the measurement interval + */ + + private Long transmittedErrorPacketsAccumulated; + + /** + * Count of error packets transmitted within the measurement interval + */ + + private Long transmittedErrorPacketsDelta; + + /** + * Cumulative count of multicast packets transmitted as read at the end of the measurement interval + */ + + private Long transmittedMulticastPacketsAccumulated; + + /** + * Count of multicast packets transmitted within the measurement interval + */ + + private Long transmittedMulticastPacketsDelta; + + /** + * Cumulative count of octets transmitted as read at the end of the measurement interval + */ + + private Long transmittedOctetsAccumulated; + + /** + * Count of octets transmitted within the measurement interval + */ + + private Long transmittedOctetsDelta; + + /** + * Cumulative count of all packets transmitted as read at the end of the measurement interval + */ + + private Long transmittedTotalPacketsAccumulated; + + /** + * Count of all packets transmitted within the measurement interval + */ + + private Long transmittedTotalPacketsDelta; + + /** + * Cumulative count of unicast packets transmitted as read at the end of the measurement interval + */ + + private Long transmittedUnicastPacketsAccumulated; + + /** + * Count of unicast packets transmitted within the measurement interval + */ + + private Long transmittedUnicastPacketsDelta; + + /** + * Indicates whether vNicPerformance values are likely inaccurate due to counter overflow or other conditions + */ + + private Boolean valuesAreSuspect; + + /** + * Virtual Network Card Identifier + */ + + private String nicIdentifier; + +} + |