diff options
Diffstat (limited to 'dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef')
18 files changed, 1060 insertions, 0 deletions
diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/AlertAction.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/AlertAction.java new file mode 100644 index 0000000..65483f2 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/AlertAction.java @@ -0,0 +1,31 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * Common Event Format Alert Action + * + * @author Rajiv Singla + */ +public enum AlertAction implements CEFModel { + + CLEAR, CONT, SET + +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/AlertType.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/AlertType.java new file mode 100644 index 0000000..9b34809 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/AlertType.java @@ -0,0 +1,44 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * CEF Alert Type + * + * @author Rajiv Singla + */ +public enum AlertType implements CEFModel { + + CARD_ANOMALY("CARD-ANOMALY"), + ELEMENT_ANOMALY("ELEMENT-ANOMALY"), + INTERFACE_ANOMALY("INTERFACE-ANOMALY"), + SERVICE_ANOMALY("SERVICE-ANOMALY"), + UNKNOWN(null); + + private final String name; + + AlertType(String name) { + this.name = name; + } + + public String getName() { + return name; + } +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/BaseCEFModel.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/BaseCEFModel.java new file mode 100644 index 0000000..da90fd0 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/BaseCEFModel.java @@ -0,0 +1,37 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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 org.onap.dcae.analytics.model.common.BaseDynamicPropertiesProvider; + +/** + * Base CEF Model should be extended by all CEF Model Entities. + * By extending CEF Model all the additional dynamic Properties + * can be accumulated in a map. + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public abstract class BaseCEFModel extends BaseDynamicPropertiesProvider implements CEFModel { +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/CEFModel.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/CEFModel.java new file mode 100644 index 0000000..8f894c7 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/CEFModel.java @@ -0,0 +1,30 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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 org.onap.dcae.analytics.model.AnalyticsModel; + +/** + * Marker interface for all DCAE Analytics Common Event Format Model implementations + * + * @author Rajiv Singla + */ +public interface CEFModel extends AnalyticsModel { +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/CommonEventHeader.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/CommonEventHeader.java new file mode 100644 index 0000000..3398b51 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/CommonEventHeader.java @@ -0,0 +1,132 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * Fields common to all Events + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class CommonEventHeader 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 Float version; +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Criticality.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Criticality.java new file mode 100644 index 0000000..d8f0875 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Criticality.java @@ -0,0 +1,30 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * Performance Criticality + * + * @author Rajiv Singla + */ +public enum Criticality implements CEFModel { + + CRIT, MAJ, UNKNOWN +} 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 new file mode 100644 index 0000000..2be00dc --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Domain.java @@ -0,0 +1,40 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * Eventing domain associated with the event + * + * @author Rajiv Singla + */ +public enum Domain implements CEFModel { + + fault, + heartbeat, + measurementsForVfScaling, + mobileFlow, + other, + sipSignaling, + stateChange, + syslog, + thresholdCrossingAlert, + voiceQuality; + +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Event.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Event.java new file mode 100644 index 0000000..aee213c --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Event.java @@ -0,0 +1,51 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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 + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class Event extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * Fields common to all Events + */ + private CommonEventHeader commonEventHeader; + + /** + * Measurements for Vf scaling fields + */ + private MeasurementsForVfScalingFields measurementsForVfScalingFields; + + /** + * Threshold crossing alert Fields. + */ + private ThresholdCrossingAlertFields thresholdCrossingAlertFields; +} 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 new file mode 100644 index 0000000..50bf3d1 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventListener.java @@ -0,0 +1,41 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * Common Event Format - Base Event Listener + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class EventListener extends BaseCEFModel { + + + private static final long serialVersionUID = 1L; + + /** + * Common Event Format - Event + */ + private Event event; +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventSeverity.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventSeverity.java new file mode 100644 index 0000000..da699b8 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/EventSeverity.java @@ -0,0 +1,37 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * CEF Event severity or priority + * <p> + * <b>NOTE: Event Severity Enum order must not be changed. Events severity is ordered from high to low</b> + * + * @author Rajiv Singla + */ +public enum EventSeverity implements CEFModel { + + CRITICAL, + MAJOR, + MINOR, + WARNING, + NORMAL + +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Field.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Field.java new file mode 100644 index 0000000..070d695 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Field.java @@ -0,0 +1,46 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * Name Value Pair + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class Field extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Name of the Field + */ + private String name; + + /** + * Value of the Field + */ + private String value; + +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/InternalHeaderFields.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/InternalHeaderFields.java new file mode 100644 index 0000000..f886052 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/InternalHeaderFields.java @@ -0,0 +1,36 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * Enrichment fields for internal VES Event Listener service use only, not supplied by event sources + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class InternalHeaderFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/MeasurementsForVfScalingFields.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/MeasurementsForVfScalingFields.java new file mode 100644 index 0000000..ce92132 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/MeasurementsForVfScalingFields.java @@ -0,0 +1,65 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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 - MeasurementsForVfScaling fields + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class MeasurementsForVfScalingFields 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 Float measurementsForVfScalingVersion; + + /** + * Usage of an array of virtual network interface cards + */ + private List<VNicPerformance> vNicPerformanceArray; + + +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/NamedArrayOfFields.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/NamedArrayOfFields.java new file mode 100644 index 0000000..b7a9530 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/NamedArrayOfFields.java @@ -0,0 +1,48 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * An array of name value pairs along with a name for the array + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class NamedArrayOfFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Name of the NamedArrayOfFields + */ + private String name; + + /** + * Array of name value pairs + */ + private List<Field> arrayOfFields; + +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/PerformanceCounter.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/PerformanceCounter.java new file mode 100644 index 0000000..8c5fa8c --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/PerformanceCounter.java @@ -0,0 +1,55 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * Common Event Format - Performance PerformanceCounter + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class PerformanceCounter extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Performance Counter Criticality. + */ + private Criticality criticality; + + /** + * Performance Counter Name + */ + private String name; + + /** + * Performance Counter for Threshold Crossed. + */ + private String thresholdCrossed; + + /** + * Performance Counter Value. + */ + private String value; +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Priority.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Priority.java new file mode 100644 index 0000000..066af2a --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/Priority.java @@ -0,0 +1,33 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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; + +/** + * Common Event Format - Event processing priority + * + * @author Rajiv Singla + */ +public enum Priority implements CEFModel { + + High, + Medium, + Normal, + Low +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/ThresholdCrossingAlertFields.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/ThresholdCrossingAlertFields.java new file mode 100644 index 0000000..625f5f6 --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/ThresholdCrossingAlertFields.java @@ -0,0 +1,113 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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 - Fields Specific to threshold crossing alert events + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class ThresholdCrossingAlertFields extends BaseCEFModel { + + private static final long serialVersionUID = 1L; + + /** + * Additional Performance counters parameters. + */ + private List<PerformanceCounter> additionalParameters; + + /** + * Event alert action + */ + private AlertAction alertAction; + + /** + * Unique short alert description such as IF-SHUB-ERRDROP + */ + private String alertDescription; + + /** + * Alert type + */ + private AlertType alertType; + + /** + * Calculated API value (if applicable) + */ + private String alertValue; + + /** + * List of eventIds associated with the event being reported + */ + private List<String> associatedAlertIdList; + + /** + * Time when the performance collector picked up the data; with RFC 2822 compliant format: + * ‘Sat, 13 Mar 2010 11:29:05 -0800’ + */ + private String collectionTimestamp; + + /** + * Specific performance collector instance used + */ + private String dataCollector; + + /** + * Type of network element + */ + private String elementType; + + /** + * Event severity or priority + */ + private EventSeverity eventSeverity; + + /** + * Time closest to when the measurement was made; with RFC 2822 compliant format: ‘Sat, 13 Mar 2010 11:29:05 -0800’ + */ + private String eventStartTimestamp; + + /** + * Physical or logical port or card (if applicable) + */ + private String interfaceName; + + /** + * Network name + */ + private String networkService; + + /** + * Possible Root Cause (reserved for future use) + */ + private String possibleRootCause; + + /** + * Version of the thresholdCrossingAlertFields block + */ + private Integer thresholdCrossingFieldsVersion; +} diff --git a/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/VNicPerformance.java b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/VNicPerformance.java new file mode 100644 index 0000000..d2c774b --- /dev/null +++ b/dcae-analytics/dcae-analytics-model/src/main/java/org/onap/dcae/analytics/model/cef/VNicPerformance.java @@ -0,0 +1,191 @@ +/* + * ================================================================================ + * Copyright (c) 2018 AT&T 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 + * + * @author Rajiv Singla + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class VNicPerformance 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 vNicIdentifier; + + +} |