A set of fixes and features
Some updates to handle errors in certain scenarios.
Formatted code
Initial work to parse json.
Added code to map certain json values from incoming data into parts of the VES format.
Added lines to map type and severity to VES
Completed support for mapping alarm messages. Also added timing functionality for tracking message send times
Change-Id: Iaf9ce372552fce3f744476719f5fd79548d22ef4
Signed-off-by: William Kurkian <wkurkian@cisco.com>
diff --git a/src/main/java/controller/Application.java b/src/main/java/controller/Application.java
index 6ae05b8..d7a0d0e 100644
--- a/src/main/java/controller/Application.java
+++ b/src/main/java/controller/Application.java
@@ -1,18 +1,18 @@
/*
- * Copyright 2018- Cisco
- *
- * 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.
- */
+* Copyright 2018- Cisco
+*
+* 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.
+*/
package controller;
import org.springframework.boot.SpringApplication;
@@ -40,7 +40,7 @@
public static void main(String[] args) {
Config.loadProperties("/opt/ves-agent/config.properties");
- KafkaThread kafka = new KafkaThread();
+ KafkaThread kafka = new KafkaThread();
kafka.start();
SpringApplication.run(Application.class, args);
}
@@ -51,13 +51,13 @@
private final static Logger logger = LoggerFactory.getLogger("KafkaThread");
public void run() {
- logger.debug("Start Kafka Consumer Thread");
- try {
- VolthaKafkaConsumer consumer = new VolthaKafkaConsumer();
- consumer.runConsumer();
- } catch (InterruptedException e) {
- logger.error(e.getMessage());
- }
+ logger.debug("Start Kafka Consumer Thread");
+ try {
+ VolthaKafkaConsumer consumer = new VolthaKafkaConsumer();
+ consumer.runConsumer();
+ } catch (InterruptedException e) {
+ logger.error(e.getMessage());
+ }
}
- }
+}