diff --git a/build.gradle b/build.gradle index 9299bc7..a3f1cf6 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'com.bsmlab.dfx' -version = '1.0.4' +version = '1.0.5-alpha' // git commit hash -> application.yml def gitCommitId = '' @@ -24,7 +24,7 @@ catch (Exception ignored) { // gradle project properties -> application.yml processResources { filesMatching('**/application.yml') { - expand(project.properties + [commitId: gitCommitId]) + expand(project.properties + [commitId: gitCommitId, version: version]) } } diff --git a/src/docs/script/startup.sh b/src/docs/script/startup.sh index fdb2ad1..d6683a5 100644 --- a/src/docs/script/startup.sh +++ b/src/docs/script/startup.sh @@ -1,4 +1,10 @@ #!/bin/sh AGENT_HOME=/home/dfxagent/agent TODAY=$(date "+%Y%m%d") -java -jar $AGENT_HOME/lib/dfxagent.jar -Xms2048m -Xmx8192m --setting.file=$AGENT_HOME/conf/settings.json & \ No newline at end of file +#java -jar $AGENT_HOME/lib/dfxagent.jar -Xms2048m -Xmx8192m --setting.file=$AGENT_HOME/conf/settings.json & +java -XX:TieredStopAtLevel=1 -jar $AGENT_HOME/lib/dfxagent.jar -Xms2048m -Xmx8192m --setting.file=$AGENT_HOME/conf/settings.json & +#JDK: Red Hat OpenJDK 17.0.11+9 (LTS), OS: Rocky Linux 8.10 사용 중 하기의 오류 발생 -> -XX:TieredStopAtLevel=1 추가 (C1만 사용하여 C2 비활성화) +#크래시 시그널: SIGSEGV +#문제 프레임: PhaseOutput::BuildOopMaps() (HotSpot C2 JIT 내부) +#크래시 스레드: "C2 CompilerThread2" (JIT 컴파일러 스레드) +#크래시 직전 컴파일 중이던 메서드: C2: ... org.springframework.boot.loader.net.protocol.jar.Handler::openConnection (5 bytes) \ No newline at end of file diff --git a/src/docs/settings-examples/dfxagent-ami-dev.json b/src/docs/settings-examples/dfxagent-ami-dev.json index d52533f..3fae39a 100644 --- a/src/docs/settings-examples/dfxagent-ami-dev.json +++ b/src/docs/settings-examples/dfxagent-ami-dev.json @@ -1,6 +1,7 @@ { "description": "현장관리 AMI 개발 서버(KT-CLOUD)에서 동작. AMI CUBRID DB 연결함", "myHostId": "fox-ami-dev-cubrid", + "myHostName": "ami.foxsoft.kr", "myListenPort": 17801, "knownAgentList": [ { @@ -31,6 +32,7 @@ "dropbox-fox-mkami-dev-oracle-receive-mtr-sl-list", "dropbox-fox-mkami-dev-oracle-receive-mtr-pt-list", "dropbox-fox-mkami-dev-oracle-receive-mtr-ttb-list", + "dropbox-fox-mkami-dev-oracle-receive-mtr-inst-list", "dropbox-fox-mkami-dev-oracle-receive-equip-base-list", "dropbox-fox-mkami-dev-oracle-receive-equip-move-list", "dropbox-fox-mkami-dev-oracle-receive-dlvg-dcu-list", @@ -44,7 +46,10 @@ } ], "statusChecker": { - "cron": "0/5 * * * * *" + "cron": "0/5 * * * * *", + "consoleHostName": "mkami.foxsoft.kr", + "consoleListenPort": 17443, + "consoleSslEnabled": true }, "dataSourceConfig": [ { @@ -252,13 +257,6 @@ "sqlId": "com.kdn.awms.mob.mtr.insertMtrMstDetailListForReceive", "description": "계기관리 계기작업공사현장정보 수신" }, - { - "dropBoxId": "dropbox-fox-ami-dev-cubrid-receive-mtr-inst-list", - "taskType": "RECEIVE_DB_TO_DB_SAVE", - "dataSourceId": "ds-cubrid", - "sqlId": "com.kdn.awms.mob.mtr.insertMtrInstListForReceive", - "description": "계기관리 작업 대상 정보 수신" - }, { "dropBoxId": "dropbox-fox-ami-dev-cubrid-receive-ann-mtr-insp-expr-list", "taskType": "RECEIVE_DB_TO_DB_SAVE", @@ -332,7 +330,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "2 0/1 * * * *" + "cron": "1,31 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -340,7 +338,7 @@ "sqlId": "com.kdn.awms.fmp.cdm.selectAtchFileListForSend", "postProcessingSqlId": "com.kdn.awms.fmp.cdm.updateAtchFileListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-atch-file-list", "description": "공통 첨부파일 송신" }, @@ -349,7 +347,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "3 0/1 * * * *" + "cron": "2,32 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -357,7 +355,7 @@ "sqlId": "com.kdn.awms.fmp.cdm.selectAtchFileDetailListForSend", "postProcessingSqlId": "com.kdn.awms.fmp.cdm.updateAtchFileDetailListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-atch-file-detail-list", "description": "공통 첨부파일상세 송신" }, @@ -366,7 +364,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "4 0/1 * * * *" + "cron": "3,33 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -374,7 +372,7 @@ "sqlId": "com.kdn.awms.mob.obs.selectWorkActDcuListForSend", "postProcessingSqlId": "com.kdn.awms.mob.obs.updateWorkActDcuListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-work-act-dcu-list", "description": "유지관리 조치내용_DCU 송신" }, @@ -383,7 +381,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "5 0/1 * * * *" + "cron": "4,34 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -391,7 +389,7 @@ "sqlId": "com.kdn.awms.mob.obs.selectWorkActModemListForSend", "postProcessingSqlId": "com.kdn.awms.mob.obs.updateWorkActModemListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-work-act-modem-list", "description": "유지관리 조치내용_모뎀 송신" }, @@ -400,7 +398,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "6 0/1 * * * *" + "cron": "5,35 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -408,7 +406,7 @@ "sqlId": "com.kdn.awms.mob.obs.selectEtcActDcuListForSend", "postProcessingSqlId": "com.kdn.awms.mob.obs.updateEtcActDcuListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-etc-act-dcu-list", "description": "유지관리 기타 조치_DCU 송신" }, @@ -417,7 +415,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "7 0/1 * * * *" + "cron": "6,36 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -425,7 +423,7 @@ "sqlId": "com.kdn.awms.mob.obs.selectEtcActModemListForSend", "postProcessingSqlId": "com.kdn.awms.mob.obs.updateEtcActModemListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-etc-act-modem-list", "description": "유지관리 기타 조치_모뎀계기 송신" }, @@ -434,7 +432,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "8 0/1 * * * *" + "cron": "7,37 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -442,7 +440,7 @@ "sqlId": "com.kdn.awms.mob.obs.selectWorkActSvcCdListForSend", "postProcessingSqlId": "com.kdn.awms.mob.obs.updateWorkActSvcCdListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-work-act-svc-cd-list", "description": "유지관리 조치내용_노임품목 송신" }, @@ -451,7 +449,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "9 0/1 * * * *" + "cron": "8,38 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -459,7 +457,7 @@ "sqlId": "com.kdn.awms.mob.cst.selectSigongActDcuListForSend", "postProcessingSqlId": "com.kdn.awms.mob.cst.updateSigongActDcuListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-sigong-act-dcu-list", "description": "AMI공사관리 시공조치내역_DCU 송신" }, @@ -468,7 +466,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "10 0/1 * * * *" + "cron": "9,39 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -476,7 +474,7 @@ "sqlId": "com.kdn.awms.mob.cst.selectSigongActModemListForSend", "postProcessingSqlId": "com.kdn.awms.mob.cst.updateSigongActModemListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-sigong-act-modem-list", "description": "AMI공사관리 시공조치내역_모뎀 송신" }, @@ -485,7 +483,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "11 0/1 * * * *" + "cron": "10,40 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -493,7 +491,7 @@ "sqlId": "com.kdn.awms.mob.cst.selectSigongUnableDcuListForSend", "postProcessingSqlId": "com.kdn.awms.mob.cst.updateSigongUnableDcuListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-sigong-unable-dcu-list", "description": "AMI공사관리 설치불가/철거내역_DCU 송신" }, @@ -502,7 +500,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "12 0/1 * * * *" + "cron": "11,41 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -510,7 +508,7 @@ "sqlId": "com.kdn.awms.mob.cst.selectSigongUnableModemListForSend", "postProcessingSqlId": "com.kdn.awms.mob.cst.updateSigongUnableModemListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-sigong-unable-modem-list", "description": "AMI공사관리 설치불가/철거내역_모뎀 송신" }, @@ -519,7 +517,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "13 0/1 * * * *" + "cron": "12,42 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -527,7 +525,7 @@ "sqlId": "com.kdn.awms.mob.emr.selectMeterNdlActListForSend", "postProcessingSqlId": "com.kdn.awms.mob.emr.updateMeterNdlActListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-meter-ndl-act-list", "description": "임시조치 당월검침정보(데이터) 송신" }, @@ -536,7 +534,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "14 0/1 * * * *" + "cron": "13,43 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -544,7 +542,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrRemoListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrRemoListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-remo-list", "description": "계기관리 부설 작업 상세 정보 송신" }, @@ -553,7 +551,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "15 0/1 * * * *" + "cron": "14,44 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -561,7 +559,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrCtListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrCtListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ct-list", "description": "계기관리 부속 변류기 작업 정보 송신" }, @@ -570,7 +568,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "16 0/1 * * * *" + "cron": "15,45 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -578,7 +576,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrCtDetailListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrCtDetailListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ct-detail-list", "description": "계기관리 부속 변류기 상세 작업 정보 송신" }, @@ -587,7 +585,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "17 0/1 * * * *" + "cron": "16,46 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -595,7 +593,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrTsListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrTsListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ts-list", "description": "계기관리 부속 타임스위치 작업 정보 송신" }, @@ -604,7 +602,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "18 0/1 * * * *" + "cron": "17,47 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -612,7 +610,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrMsListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrMsListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ms-list", "description": "계기관리 부속 전자접촉기 작업 정보 송신" }, @@ -621,7 +619,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "19 0/1 * * * *" + "cron": "18,48 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -629,7 +627,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrMbListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrMbListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-mb-list", "description": "계기관리 부속 계기함 작업 정보 송신" }, @@ -638,7 +636,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "20 0/1 * * * *" + "cron": "19,49 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -646,7 +644,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrSpdListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrSpdListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-spd-list", "description": "계기관리 부속 SPD 작업 정보 송신" }, @@ -655,7 +653,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "21 0/1 * * * *" + "cron": "20,50 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -663,7 +661,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrGdListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrGdListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-gd-list", "description": "계기관리 지침작업정보 송신" }, @@ -672,7 +670,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "22 0/1 * * * *" + "cron": "21,51 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -680,7 +678,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrSlListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrSlListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-sl-list", "description": "계기관리 봉인작업정보 송신" }, @@ -689,7 +687,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "23 0/1 * * * *" + "cron": "22,52 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -697,7 +695,7 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrPtListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrPtListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-pt-list", "description": "계기관리 변성기 작업 정보 송신" }, @@ -706,7 +704,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "24 0/1 * * * *" + "cron": "23,53 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -714,16 +712,33 @@ "sqlId": "com.kdn.awms.mob.mtr.selectMtrTtbListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrTtbListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-ttb-list", "description": "계기관리 시험용단자대 작업 정보 송신" }, + { + "postmanId": "postman-fox-ami-dev-cubrid-send-mtr-inst-list", + "taskType": "DB_READ_THEN_SEND", + "action": { + "type": "SCHEDULED", + "cron": "0,30 0/1 * * * *" + }, + "message": { + "messageType": "TRANSFER_DB_TO_DB", + "dataSourceId": "ds-cubrid", + "sqlId": "com.kdn.awms.mob.mtr.selectMtrInstListForSend", + "postProcessingSqlId": "com.kdn.awms.mob.mtr.updateMtrInstListTransferDone" + }, + "recipientHostId": "mkami-oracle", + "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-inst-list", + "description": "계기관리 작업 대상 정보 송신" + }, { "postmanId": "postman-fox-ami-dev-cubrid-send-equip-move-list", "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "25 0/1 * * * *" + "cron": "24,54 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -731,7 +746,7 @@ "sqlId": "com.kdn.awms.mob.mtl.selectEquipMoveListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtl.updateEquipMoveListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-equip-move-list", "description": "자재관리 자재이력정보 송신" }, @@ -740,7 +755,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "26 0/1 * * * *" + "cron": "25,55 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -748,7 +763,7 @@ "sqlId": "com.kdn.awms.mob.mtl.selectEquipBaseListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtl.updateEquipBaseListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-equip-base-list", "description": "자재관리 자재기본정보 송신" }, @@ -757,7 +772,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "27 0/1 * * * *" + "cron": "26,56 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -765,7 +780,7 @@ "sqlId": "com.kdn.awms.mob.mtl.selectDlvgDcuListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtl.updateDlvgDcuListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-dlvg-dcu-list", "description": "자재관리 자재납품마스터_DCU 송신" }, @@ -774,7 +789,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "28 0/1 * * * *" + "cron": "27,57 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -782,7 +797,7 @@ "sqlId": "com.kdn.awms.mob.mtl.selectDlvgModmListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtl.updateDlvgModmListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-dlvg-modm-list", "description": "자재관리 자재납품마스터_모뎀 송신" }, @@ -791,7 +806,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "29 0/1 * * * *" + "cron": "28,58 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -799,7 +814,7 @@ "sqlId": "com.kdn.awms.mob.mtl.selectDlvgMetrListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtl.updateDlvgMetrListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-dlvg-metr-list", "description": "자재관리 자재납품마스터_계기 송신" }, @@ -808,7 +823,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "30 0/1 * * * *" + "cron": "29,59 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -816,7 +831,7 @@ "sqlId": "com.kdn.awms.mob.mtl.selectDlvgLteModmListForSend", "postProcessingSqlId": "com.kdn.awms.mob.mtl.updateDlvgLteModmListTransferDone" }, - "recipientHostId": "fox-mkami-dev-oracle", + "recipientHostId": "mkami-oracle", "recipientDropBoxId": "dropbox-fox-mkami-dev-oracle-receive-dlvg-lte-modm-list", "description": "자재관리 자재납품마스터_LTE모뎀 송신" } diff --git a/src/docs/settings-examples/dfxagent-mkami-dev.json b/src/docs/settings-examples/dfxagent-mkami-dev.json index b2f7c3b..ab5522c 100644 --- a/src/docs/settings-examples/dfxagent-mkami-dev.json +++ b/src/docs/settings-examples/dfxagent-mkami-dev.json @@ -1,6 +1,7 @@ { "description": "워크스테이션에서 실행함. 워크스테이션 oracle 연결.", "myHostId": "fox-mkami-dev-oracle", + "myHostName": "mkami.foxsoft.kr", "myListenPort": 17801, "knownAgentList": [ { @@ -29,7 +30,6 @@ "dropbox-fox-ami-dev-cubrid-receive-meter-ndl-lst-list", "dropbox-fox-ami-dev-cubrid-receive-mtr-mst-list", "dropbox-fox-ami-dev-cubrid-receive-mtr-mst-detail-list", - "dropbox-fox-ami-dev-cubrid-receive-mtr-inst-list", "dropbox-fox-ami-dev-cubrid-receive-ann-mtr-insp-expr-list", "dropbox-fox-ami-dev-cubrid-receive-inln-co-list", "dropbox-fox-ami-dev-cubrid-receive-sbcn-co-list", @@ -48,7 +48,10 @@ } ], "statusChecker": { - "cron": "0/5 * * * * *" + "cron": "0/5 * * * * *", + "consoleHostName": "mkami.foxsoft.kr", + "consoleListenPort": 17443, + "consoleSslEnabled": true }, "dataSourceConfig": [ { @@ -256,6 +259,13 @@ "sqlId": "com.kdn.mkami.mob.mtr.insertMtrTtbListForReceive", "description": "계기관리 시험용단자대 작업 정보 수신" }, + { + "dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-mtr-inst-list", + "taskType": "RECEIVE_DB_TO_DB_SAVE", + "dataSourceId": "ds-oracle", + "sqlId": "com.kdn.mkami.mob.mtr.insertMtrInstListForReceive", + "description": "계기관리 작업 대상 정보 수신" + }, { "dropBoxId": "dropbox-fox-mkami-dev-oracle-receive-equip-base-list", "taskType": "RECEIVE_DB_TO_DB_SAVE", @@ -308,7 +318,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "1 1 * * * *" + "cron": "1,31 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -325,7 +335,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "2 1 0 * * *" + "cron": "2,32 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -342,7 +352,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "3 1 0 * * *" + "cron": "3,33 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -359,7 +369,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "4 1 0 * * *" + "cron": "4,34 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -376,7 +386,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "5 1 0 * * *" + "cron": "5,35 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -393,7 +403,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "6 1 0 * * *" + "cron": "6,36 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -410,7 +420,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "7 1 0 * * *" + "cron": "7,37 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -427,7 +437,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "8 1 0 * * *" + "cron": "8,38 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -444,7 +454,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "31 0/1 * * * *" + "cron": "9,39 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -461,7 +471,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "32 0/1 * * * *" + "cron": "10,40 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -478,7 +488,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "33 0/1 * * * *" + "cron": "11,41 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -495,7 +505,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "34 0/1 * * * *" + "cron": "12,42 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -512,7 +522,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "35 0/1 * * * *" + "cron": "13,43 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -529,7 +539,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "36 0/1 * * * *" + "cron": "14,44 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -546,7 +556,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "37 0/1 * * * *" + "cron": "15,45 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -563,7 +573,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "38 0/1 * * * *" + "cron": "16,46 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -580,7 +590,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "39 0/1 * * * *" + "cron": "17,47 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -597,7 +607,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "40 0/1 * * * *" + "cron": "18,48 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -614,7 +624,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "41 0/1 * * * *" + "cron": "19,49 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -631,7 +641,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "42 0/1 * * * *" + "cron": "20,50 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -648,7 +658,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "43 0/1 * * * *" + "cron": "21,51 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -660,29 +670,12 @@ "recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-mtr-mst-detail-list", "description": "계기관리 계기작업공사현장정보 송신" }, - { - "postmanId": "postman-fox-mkami-dev-oracle-send-mtr-inst-list", - "taskType": "DB_READ_THEN_SEND", - "action": { - "type": "SCHEDULED", - "cron": "44 0/1 * * * *" - }, - "message": { - "messageType": "TRANSFER_DB_TO_DB", - "dataSourceId": "ds-oracle", - "sqlId": "com.kdn.mkami.mob.mtr.selectMtrInstListForSend", - "postProcessingSqlId": "com.kdn.mkami.mob.mtr.updateMtrInstListTransferDone" - }, - "recipientHostId": "fox-ami-dev-cubrid", - "recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-mtr-inst-list", - "description": "계기관리 작업 대상 정보 송신" - }, { "postmanId": "postman-fox-mkami-dev-oracle-send-ann-mtr-insp-expr-list", "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "45 0/1 * * * *" + "cron": "23,53 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -699,7 +692,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "10 1 0 * * *" + "cron": "24,54 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -716,7 +709,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "11 1 0 * * *" + "cron": "25,55 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -733,7 +726,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "12 1 0 * * *" + "cron": "26,56 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -750,7 +743,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "13 1 0 * * *" + "cron": "27,57 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -767,7 +760,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "14 1 0 * * *" + "cron": "28,58 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -784,7 +777,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "15 1 0 * * *" + "cron": "29,59 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -801,7 +794,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "16 1 0 * * *" + "cron": "0,30 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -818,7 +811,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "17 1 0 * * *" + "cron": "1,31 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -835,7 +828,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "18 1 0 * * *" + "cron": "2,32 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -852,7 +845,7 @@ "taskType": "DB_READ_THEN_SEND", "action": { "type": "SCHEDULED", - "cron": "19 1 0 * * *" + "cron": "3,33 0/1 * * * *" }, "message": { "messageType": "TRANSFER_DB_TO_DB", @@ -862,7 +855,7 @@ }, "recipientHostId": "fox-ami-dev-cubrid", "recipientDropBoxId": "dropbox-fox-ami-dev-cubrid-receive-mtr-acpt-inst-list", - "description": "계기관리실효계기 외 작업 대상리스트 송신" + "description": "계기관리 실효계기 외 작업 대상리스트 송신" } ] } diff --git a/src/main/java/com/bsmlab/dfx/agent/config/AgentConfigDto.java b/src/main/java/com/bsmlab/dfx/agent/config/AgentConfigDto.java index 686e2f2..4810035 100644 --- a/src/main/java/com/bsmlab/dfx/agent/config/AgentConfigDto.java +++ b/src/main/java/com/bsmlab/dfx/agent/config/AgentConfigDto.java @@ -9,6 +9,7 @@ import java.util.Map; public class AgentConfigDto { private String description; private String myHostId; + private String myHostName; private int myListenPort; private List knownAgentList; private StatusChecker statusChecker; @@ -32,6 +33,9 @@ public class AgentConfigDto { @Data public static class StatusChecker { private String cron; + private String consoleHostName; + private int consoleListenPort; + private boolean consoleSslEnabled; } @Data diff --git a/src/main/java/com/bsmlab/dfx/agent/listener/dto/CommandDto.java b/src/main/java/com/bsmlab/dfx/agent/listener/dto/CommandDto.java index 3a0a0b3..783dc9d 100644 --- a/src/main/java/com/bsmlab/dfx/agent/listener/dto/CommandDto.java +++ b/src/main/java/com/bsmlab/dfx/agent/listener/dto/CommandDto.java @@ -10,6 +10,7 @@ import lombok.*; public class CommandDto { private CommandType commandType; private String messageUuid; + private String data; public static enum CommandType { ALIVE, diff --git a/src/main/java/com/bsmlab/dfx/agent/support/MessageUtils.java b/src/main/java/com/bsmlab/dfx/agent/support/MessageUtils.java index 27b5c8f..1ecb460 100644 --- a/src/main/java/com/bsmlab/dfx/agent/support/MessageUtils.java +++ b/src/main/java/com/bsmlab/dfx/agent/support/MessageUtils.java @@ -253,4 +253,50 @@ public class MessageUtils { return ackDto; } + public static AckDto alive(AgentConfigReader agentConfigReader, AgentConfigDto.KnownAgent knownAgent) throws JsonProcessingException { + String messageUuid = UUID.randomUUID().toString(); + CommandDto commandDto = CommandDto.builder().commandType(CommandDto.CommandType.ALIVE).messageUuid(messageUuid).build(); + HttpHeaders httpHeaders = new HttpHeaders(); + httpHeaders.setContentType(MediaType.APPLICATION_JSON); + httpHeaders.set("User-Agent", agentConfigReader.getApplicationName() + ", version: " + agentConfigReader.getApplicationVersion() + "(" + agentConfigReader.getApplicationCommitId() + ")" + + ", host ID: " + agentConfigReader.getAgentConfigDto().getMyHostId() + + ", action: status-check(ALIVE)" + ); + HttpEntity bodyEntity = new HttpEntity<>(commandDto, httpHeaders); + RestTemplate restTemplate = new RestTemplate(); + String url = "http://" + knownAgent.getHostName() + ":" + knownAgent.getListenPort() + "/command"; + log.debug("StatusChecker to {} send a message UUID {}", knownAgent.getHostName(), messageUuid); + String response = ""; + ObjectMapper objectMapper = new ObjectMapper(); + AckDto ackDto = null; + response = restTemplate.postForObject(url, bodyEntity, String.class); + ackDto = objectMapper.readValue(response, new TypeReference() {}); + return ackDto; + } + + public static AckDto announceInformation(AgentConfigReader agentConfigReader) throws JsonProcessingException { + ObjectMapper objectMapper = new ObjectMapper(); + String messageUuid = UUID.randomUUID().toString(); + String data = objectMapper.writeValueAsString(agentConfigReader.getAgentConfigDto()); + CommandDto commandDto = CommandDto.builder().commandType(CommandDto.CommandType.INFORMATION).messageUuid(messageUuid).data(data).build(); + HttpHeaders httpHeaders = new HttpHeaders(); + httpHeaders.setContentType(MediaType.APPLICATION_JSON); + httpHeaders.set("User-Agent", agentConfigReader.getApplicationName() + ", version: " + agentConfigReader.getApplicationVersion() + "(" + agentConfigReader.getApplicationCommitId() + ")" + + ", host ID: " + agentConfigReader.getAgentConfigDto().getMyHostId() + + ", action: announce-information" + ); + HttpEntity bodyEntity = new HttpEntity<>(commandDto, httpHeaders); + RestTemplate restTemplate = new RestTemplate(); + String url = (agentConfigReader.getAgentConfigDto().getStatusChecker().isConsoleSslEnabled() ? "https://" : "http://") + + agentConfigReader.getAgentConfigDto().getStatusChecker().getConsoleHostName() + ":" + + agentConfigReader.getAgentConfigDto().getStatusChecker().getConsoleListenPort() + + "/command"; + log.debug("StatusChecker to console {} send a message UUID {}", agentConfigReader.getAgentConfigDto().getStatusChecker().getConsoleHostName(), messageUuid); + String response = ""; + AckDto ackDto = null; + response = restTemplate.postForObject(url, bodyEntity, String.class); + ackDto = objectMapper.readValue(response, new TypeReference() {}); + return ackDto; + } + } diff --git a/src/main/java/com/bsmlab/dfx/agent/task/status/StatusCheckerSchedulerService.java b/src/main/java/com/bsmlab/dfx/agent/task/status/StatusCheckerSchedulerService.java index 07b37e3..4d34abf 100644 --- a/src/main/java/com/bsmlab/dfx/agent/task/status/StatusCheckerSchedulerService.java +++ b/src/main/java/com/bsmlab/dfx/agent/task/status/StatusCheckerSchedulerService.java @@ -3,24 +3,18 @@ package com.bsmlab.dfx.agent.task.status; import com.bsmlab.dfx.agent.config.AgentConfigDto; import com.bsmlab.dfx.agent.config.AgentConfigReader; import com.bsmlab.dfx.agent.listener.dto.AckDto; -import com.bsmlab.dfx.agent.listener.dto.CommandDto; +import com.bsmlab.dfx.agent.support.MessageUtils; import com.bsmlab.dfx.agent.task.dropbox.DropBoxService; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; +import org.apache.commons.lang3.StringUtils; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.support.CronTrigger; import org.springframework.stereotype.Service; import org.springframework.web.client.ResourceAccessException; -import org.springframework.web.client.RestTemplate; import java.util.List; -import java.util.UUID; import java.util.concurrent.ScheduledFuture; @Service @@ -45,24 +39,9 @@ public class StatusCheckerSchedulerService { List knownAgentList = this.agentConfigReader.getAgentConfigDto().getKnownAgentList(); if(knownAgentList != null) { for(AgentConfigDto.KnownAgent knownAgent : knownAgentList) { - String messageUuid = UUID.randomUUID().toString(); - CommandDto commandDto = CommandDto.builder().commandType(CommandDto.CommandType.ALIVE).messageUuid(messageUuid).build(); - HttpHeaders httpHeaders = new HttpHeaders(); - httpHeaders.setContentType(MediaType.APPLICATION_JSON); - httpHeaders.set("User-Agent", agentConfigReader.getApplicationName() + ", version: " + agentConfigReader.getApplicationVersion() + "(" + agentConfigReader.getApplicationCommitId() + ")" - + ", host ID: " + agentConfigReader.getAgentConfigDto().getMyHostId() - + ", action: status-check(ALIVE)" - ); - HttpEntity bodyEntity = new HttpEntity<>(commandDto, httpHeaders); - RestTemplate restTemplate = new RestTemplate(); - String url = "http://" + knownAgent.getHostName() + ":" + knownAgent.getListenPort() + "/command"; - log.debug("StatusChecker to {} send a message UUID {}", knownAgent.getHostName(), messageUuid); - String response = ""; - ObjectMapper objectMapper = new ObjectMapper(); AckDto ackDto = null; try { - response = restTemplate.postForObject(url, bodyEntity, String.class); - ackDto = objectMapper.readValue(response, new TypeReference() {}); + ackDto = MessageUtils.alive(this.agentConfigReader, knownAgent); log.debug("StatusChecker received ack from {} ack: {}", knownAgent.getHostName(), ackDto); if(AckDto.ResultType.PROCESS_SUCCESS == ackDto.getResult()) { // known agent is alive @@ -85,5 +64,22 @@ public class StatusCheckerSchedulerService { } } } + if(StringUtils.isNotEmpty(this.agentConfigReader.getAgentConfigDto().getStatusChecker().getConsoleHostName()) && this.agentConfigReader.getAgentConfigDto().getStatusChecker().getConsoleListenPort() > 0) { + AckDto ackDto = null; + try { + ackDto = MessageUtils.announceInformation(this.agentConfigReader); + log.debug("StatusChecker received ack from {} ack: {}", this.agentConfigReader.getAgentConfigDto().getStatusChecker().getConsoleHostName(), ackDto); + if(AckDto.ResultType.PROCESS_SUCCESS == ackDto.getResult()) { + // console response + log.debug("console {} is ALIVE", this.agentConfigReader.getAgentConfigDto().getStatusChecker().getConsoleHostName()); + } + else { + // console is down + log.debug("console {} is DOWN", this.agentConfigReader.getAgentConfigDto().getStatusChecker().getConsoleHostName()); + } + } catch (JsonProcessingException e) { + log.debug("Console {} information message is not valid then set DOWN", this.agentConfigReader.getAgentConfigDto().getStatusChecker().getConsoleHostName()); + } + } } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1c7d3ad..9c48849 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -13,6 +13,13 @@ logging: org.springframework.boot: ERROR com.bsmlab.dfx.agent: DEBUG com.bsmlab.dfx.agent.DfxAgentApplication: WARN + org.bgee.log4jdbc-log4j2: + sqlonly: OFF + sqltiming: INFO + audit: OFF + resultset: OFF + resultsettable: OFF + connection: OFF log4jdbc: dump: sql: