何知谦 %!s(int64=4) %!d(string=hai) anos
pai
achega
b0a3091550

+ 57 - 57
PaasMonitor-client/src/main/java/com/nju/edu/paasMonitorClient/MonitorClient.java

@@ -69,62 +69,62 @@ public class MonitorClient {
         return res.toString();
     }
 
-    public static void main(String[] args) throws InterruptedException {
-        logEvent(SeecSystem.PAAS, "try", "first try", EventStatus.FAIL);
-//        logEvent(SeecSystem.PAAS, "try", "first try", EventStatus.SUCCESS);
-//
-//        for (int i = 0; i < 3; i++) {
-            Call call1 = new Call(SeecSystem.PAAS, "tryCall","tryCall");
-            call1.start();
-            Thread.sleep(100);
-            call1.fail();
-            call1.end();
-////            call1 = new Call(SeecSystem.PAAS, "tryCall","tryCall");
-////            call1.start();
-////            Thread.sleep(100);
-////            call1.fail();
-////            call1.end();
+//    public static void main(String[] args) throws InterruptedException {
+//        logEvent(SeecSystem.PAAS, "try", "first try", EventStatus.FAIL);
+////        logEvent(SeecSystem.PAAS, "try", "first try", EventStatus.SUCCESS);
 ////
-////
-////            Call call2 = createCall(SeecSystem.PAAS, "try");
-////            call2.start();
-////            Thread.sleep(2300);
-////            call2.fail();
-////            call2.end();
-            logMetricForCount(SeecSystem.PAAS, "try", "i", 8);
-////            logMetricForCount(SeecSystem.PAAS, "try", "i", 8);
-////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 7);
-////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 5);
-////            logMetricForCount(SeecSystem.PAAS, "try", "i", 8);
-////            logMetricForCount(SeecSystem.PAAS, "try", "i", 8);
-////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 7);
-////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 5);
-////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 5);
-////            Thread.sleep(60000);
-            Exception e = new Exception("example");
-            logError(SeecSystem.PAAS, "tryError", "tryError", "error", e);
-//            logError(SeecSystem.PAAS, "try", "t", "error", e);
-////            logError(SeecSystem.PAAS, "try", "t1", "error", e);
-////            logError(SeecSystem.PAAS, "try1", "t", "error", e);
-////            logError(SeecSystem.PAAS, "try2", "t1", "error", e);
-////            logError(SeecSystem.PAAS, "try1", "t", "error", e);
-////            logError(SeecSystem.BOK, "try", "t", "error", e);
-////            logError(SeecSystem.BOK, "try", "t", "error", e);
-////            logError(SeecSystem.BOK, "try", "t1", "error", e);
-////            logError(SeecSystem.BOK, "try1", "t", "error", e);
-////            logError(SeecSystem.BOK, "try2", "t1", "error", e);
-////            logError(SeecSystem.BOK, "try1", "t", "error", e);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.FAIL);
-//            Thread.sleep(3000);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.FAIL);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
-//            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
-//        }
-    }
+////        for (int i = 0; i < 3; i++) {
+//            Call call1 = new Call(SeecSystem.PAAS, "tryCall","tryCall");
+//            call1.start();
+//            Thread.sleep(100);
+//            call1.fail();
+//            call1.end();
+//////            call1 = new Call(SeecSystem.PAAS, "tryCall","tryCall");
+//////            call1.start();
+//////            Thread.sleep(100);
+//////            call1.fail();
+//////            call1.end();
+//////
+//////
+//////            Call call2 = createCall(SeecSystem.PAAS, "try");
+//////            call2.start();
+//////            Thread.sleep(2300);
+//////            call2.fail();
+//////            call2.end();
+//            logMetricForCount(SeecSystem.PAAS, "try", "i", 8);
+//////            logMetricForCount(SeecSystem.PAAS, "try", "i", 8);
+//////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 7);
+//////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 5);
+//////            logMetricForCount(SeecSystem.PAAS, "try", "i", 8);
+//////            logMetricForCount(SeecSystem.PAAS, "try", "i", 8);
+//////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 7);
+//////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 5);
+//////            logMetricForDuration(SeecSystem.PAAS, "try", "i", 5);
+//////            Thread.sleep(60000);
+//            Exception e = new Exception("example");
+//            logError(SeecSystem.PAAS, "tryError", "tryError", "error", e);
+////            logError(SeecSystem.PAAS, "try", "t", "error", e);
+//////            logError(SeecSystem.PAAS, "try", "t1", "error", e);
+//////            logError(SeecSystem.PAAS, "try1", "t", "error", e);
+//////            logError(SeecSystem.PAAS, "try2", "t1", "error", e);
+//////            logError(SeecSystem.PAAS, "try1", "t", "error", e);
+//////            logError(SeecSystem.BOK, "try", "t", "error", e);
+//////            logError(SeecSystem.BOK, "try", "t", "error", e);
+//////            logError(SeecSystem.BOK, "try", "t1", "error", e);
+//////            logError(SeecSystem.BOK, "try1", "t", "error", e);
+//////            logError(SeecSystem.BOK, "try2", "t1", "error", e);
+//////            logError(SeecSystem.BOK, "try1", "t", "error", e);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.FAIL);
+////            Thread.sleep(3000);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.FAIL);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
+////            logEvent(SeecSystem.PAAS, "tryEvent", "tryEvent", EventStatus.SUCCESS);
+////        }
+//    }
 }

+ 2 - 2
PaasMonitor-client/target/classes/config.properties

@@ -1,3 +1,3 @@
 #server.address.prefix = http://icomo.top:8080/api/log/
-#server.address.prefix = http://101.133.232.246:8080/api/log/
-server.address.prefix = http://localhost:8080/api/log/
+server.address.prefix = http://101.133.232.246:8080/api/log/
+#server.address.prefix = http://localhost:8080/api/log/

+ 0 - 1
PaasMonitor-server/src/main/java/com/nju/edu/paasMonitorServer/controller/PaasMonitorLogController.java

@@ -33,7 +33,6 @@ public class PaasMonitorLogController {
 
     @PostMapping("/event")
     public Response<String> log(@RequestBody EventDto message) {
-        System.out.println("event is call");
         Event event = new Event(message.getSystem(), message.getCategory(),
                 message.getName(), message.getCreateTime(), message.getStatus());
         messageService.collectMessage(event);