diff --git a/conf/db/upgrade/V5.5.28__schema.sql b/conf/db/upgrade/V5.5.28__schema.sql index 95db09ddf99..db5730e5588 100644 --- a/conf/db/upgrade/V5.5.28__schema.sql +++ b/conf/db/upgrade/V5.5.28__schema.sql @@ -204,6 +204,29 @@ ALTER TABLE `zstack`.`ConsoleProxyAgentVO` ADD COLUMN `consoleProxyOverriddenIpv ALTER TABLE `zstack`.`AlarmVO` ADD COLUMN `recoveryDuration` int unsigned DEFAULT NULL; ALTER TABLE `zstack`.`AlarmVO` ADD COLUMN `recoveryThreshold` int unsigned DEFAULT NULL; +DROP PROCEDURE IF EXISTS addAlarmLabelLookupIndex; +DELIMITER $$ +CREATE PROCEDURE addAlarmLabelLookupIndex() +BEGIN + DECLARE index_count INT DEFAULT 0; + + SELECT COUNT(*) INTO index_count + FROM information_schema.statistics + WHERE table_schema = DATABASE() + AND table_name = 'AlarmLabelVO' + AND index_name = 'idxAlarmLabelVOAlarmUuidKey'; + + IF index_count < 1 THEN + ALTER TABLE `zstack`.`AlarmLabelVO` + ADD INDEX `idxAlarmLabelVOAlarmUuidKey` (`alarmUuid`, `key`); + END IF; +END $$ +DELIMITER ; + +CALL addAlarmLabelLookupIndex(); +DROP PROCEDURE IF EXISTS addAlarmLabelLookupIndex; +CALL DELETE_INDEX('AlarmLabelVO', 'alarmUuid'); + CREATE TABLE IF NOT EXISTS `zstack`.`AlarmResourceStateVO` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `alarmUuid` varchar(32) NOT NULL, diff --git a/conf/i18n.json b/conf/i18n.json index 29c50620912..2a67e91e9d8 100755 --- a/conf/i18n.json +++ b/conf/i18n.json @@ -37021,14 +37021,14 @@ { "raw": "duplicate label[key:%s, operator:%s, value:%s] for the alarm[uuid:%s]", "en_US": "duplicate label[key:{0}, operator:{1}, value:{2}] for the alarm[uuid:{3}]", - "zh_CN": "报警器[uuid:{2}]已经存在标签[key:{0}, operator:{1}, value:{2}]", + "zh_CN": "报警器[uuid:{3}]已经存在标签[key:{0}, operator:{1}, value:{2}]", "arguments": [ - "msg.getKey()", - "msg.getOperator()", - "msg.getValue()", - "msg.getAlarmUuid()" + "key", + "operator", + "value", + "alarmUuid" ], - "line": 296, + "line": 314, "fileName": "src/main/java/org/zstack/zwatch/alarm/AlarmApiInterceptor.java" }, { @@ -38001,4 +38001,4 @@ "line": 166, "fileName": "src/main/java/org/zstack/sns/platform/universalsms/SNSUniversalSmsEndpoint.java" } -] \ No newline at end of file +] diff --git a/conf/i18n/globalErrorCodeMapping/global-error-de-DE.json b/conf/i18n/globalErrorCodeMapping/global-error-de-DE.json index eb52bff974f..b68df6be604 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-de-DE.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-de-DE.json @@ -845,7 +845,7 @@ "ORG_ZSTACK_ZWATCH_ALARM_10026": "Doppelter Schlüssel[%s] mit unterschiedlichen Werten{%s}%", "ORG_ZSTACK_NETWORK_SERVICE_LB_10170": "Server-IP konnte nicht zur Shared-Load-Balancer-Servergruppe %s hinzugefügt werden", "ORG_ZSTACK_ZWATCH_ALARM_10025": "Die Metrik hat nicht das angegebene Label[%s]", - "ORG_ZSTACK_ZWATCH_ALARM_10023": "Doppeltes Label definiert für den Alarm mit UUID [uuid:%s]", + "ORG_ZSTACK_ZWATCH_ALARM_10023": "Doppeltes Label[key:%s, operator:%s, value:%s] definiert für den Alarm[uuid:%s]", "ORG_ZSTACK_ZWATCH_ALARM_10029": "Die Metrik[%s] ist auf Administratoren beschränkt und ist für Ihre aktuelle Benutzerrolle nicht verfügbar.", "ORG_ZSTACK_NETWORK_SERVICE_LB_10171": "Backend-Server konnte nicht geändert werden, da vmincs und Server-IPs null sind", "ORG_ZSTACK_ZWATCH_ALARM_10028": "Namespace[%s] enthält nicht die Metrik[%s]", @@ -4731,4 +4731,4 @@ "ORG_ZSTACK_AI_10163": "VM[name:%s, uuid:%s] läuft auf keinem Host", "ORG_ZSTACK_AI_10164": "Modell[name:%s, uuid:%s] ist nicht für das Konto der VM freigegeben (oder öffentlich). Zum Mounten muss das Modell denselben Freigaberegeln wie die VM unterliegen.", "ORG_ZSTACK_AI_10165": "ModelCenter[uuid:%s] wurde für das Modell[name:%s, uuid:%s] nicht gefunden" -} \ No newline at end of file +} diff --git a/conf/i18n/globalErrorCodeMapping/global-error-en_US.json b/conf/i18n/globalErrorCodeMapping/global-error-en_US.json index 637997dc616..fc789da6b79 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-en_US.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-en_US.json @@ -849,7 +849,7 @@ "ORG_ZSTACK_ZWATCH_ALARM_10026": "duplicate key[%s] with different values{%s}%", "ORG_ZSTACK_NETWORK_SERVICE_LB_10170": "could not add server IP to share load balancer server group %s", "ORG_ZSTACK_ZWATCH_ALARM_10025": "the metric does not have the specified label[%s]", - "ORG_ZSTACK_ZWATCH_ALARM_10023": "duplicate label defined for the alarm with UUID [uuid:%s]", + "ORG_ZSTACK_ZWATCH_ALARM_10023": "duplicate label[key:%s, operator:%s, value:%s] for the alarm[uuid:%s]", "ORG_ZSTACK_ZWATCH_ALARM_10029": "the metric[%s] is restricted to administrators and is not available for your current user role.", "ORG_ZSTACK_NETWORK_SERVICE_LB_10171": "could not modify backend server because vmincs and server IPs are null", "ORG_ZSTACK_ZWATCH_ALARM_10028": "namespace[%s] does not contain the metric[%s]", diff --git a/conf/i18n/globalErrorCodeMapping/global-error-fr-FR.json b/conf/i18n/globalErrorCodeMapping/global-error-fr-FR.json index 00b52b1e03d..c16f5b30952 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-fr-FR.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-fr-FR.json @@ -845,7 +845,7 @@ "ORG_ZSTACK_ZWATCH_ALARM_10026": "clé en double[%s] avec des valeurs différentes{%s}%", "ORG_ZSTACK_NETWORK_SERVICE_LB_10170": "impossible d'ajouter l'IP du serveur au groupe de serveurs d'équilibrage de charge partagé %s", "ORG_ZSTACK_ZWATCH_ALARM_10025": "la métrique ne possède pas l'étiquette spécifiée[%s]", - "ORG_ZSTACK_ZWATCH_ALARM_10023": "étiquette en double définie pour l'alarme avec UUID [uuid:%s]", + "ORG_ZSTACK_ZWATCH_ALARM_10023": "étiquette en double[key:%s, operator:%s, value:%s] définie pour l'alarme[uuid:%s]", "ORG_ZSTACK_ZWATCH_ALARM_10029": "la métrique[%s] est restreinte aux administrateurs et n'est pas disponible pour votre rôle utilisateur actuel.", "ORG_ZSTACK_NETWORK_SERVICE_LB_10171": "impossible de modifier le serveur backend car vmincs et les IPs du serveur sont null", "ORG_ZSTACK_ZWATCH_ALARM_10028": "l'espace de noms[%s] ne contient pas la métrique[%s]", @@ -4731,4 +4731,4 @@ "ORG_ZSTACK_AI_10163": "La VM[nom:%s, uuid:%s] ne s'exécute sur aucun hôte", "ORG_ZSTACK_AI_10164": "Le modèle[nom:%s, uuid:%s] n'est pas partagé avec le compte propriétaire de cette VM (ni public). Le montage exige que le modèle soit accessible selon les mêmes règles de partage.", "ORG_ZSTACK_AI_10165": "ModelCenter[uuid:%s] introuvable pour le modèle[nom:%s, uuid:%s]" -} \ No newline at end of file +} diff --git a/conf/i18n/globalErrorCodeMapping/global-error-id-ID.json b/conf/i18n/globalErrorCodeMapping/global-error-id-ID.json index 4324b9a1774..1eec664cbeb 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-id-ID.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-id-ID.json @@ -845,7 +845,7 @@ "ORG_ZSTACK_ZWATCH_ALARM_10026": "kunci[%s] duplikat dengan nilai berbeda{%s}%", "ORG_ZSTACK_NETWORK_SERVICE_LB_10170": "tidak dapat menambahkan IP server ke grup server load balancer bersama %s", "ORG_ZSTACK_ZWATCH_ALARM_10025": "metrik tidak memiliki label yang ditentukan[%s]", - "ORG_ZSTACK_ZWATCH_ALARM_10023": "label duplikat didefinisikan untuk alarm dengan UUID [uuid:%s]", + "ORG_ZSTACK_ZWATCH_ALARM_10023": "label duplikat[key:%s, operator:%s, value:%s] didefinisikan untuk alarm[uuid:%s]", "ORG_ZSTACK_ZWATCH_ALARM_10029": "metrik[%s] dibatasi untuk administrator dan tidak tersedia untuk peran pengguna Anda saat ini.", "ORG_ZSTACK_NETWORK_SERVICE_LB_10171": "tidak dapat memodifikasi server backend karena vmincs dan IP server kosong", "ORG_ZSTACK_ZWATCH_ALARM_10028": "namespace[%s] tidak berisi metrik[%s]", @@ -4731,4 +4731,4 @@ "ORG_ZSTACK_AI_10163": "VM[nama:%s, uuid:%s] tidak berjalan pada host manapun", "ORG_ZSTACK_AI_10164": "Model[nama:%s, uuid:%s] tidak dibagikan ke akun pemilik VM ini (atau ke publik). Mount membutuhkan model yang dapat diakses dengan aturan berbagi yang sama dengan VM.", "ORG_ZSTACK_AI_10165": "ModelCenter[uuid:%s] tidak ditemukan untuk Model[nama:%s, uuid:%s]" -} \ No newline at end of file +} diff --git a/conf/i18n/globalErrorCodeMapping/global-error-ja-JP.json b/conf/i18n/globalErrorCodeMapping/global-error-ja-JP.json index 307986d2224..1e3e14c7968 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-ja-JP.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-ja-JP.json @@ -845,7 +845,7 @@ "ORG_ZSTACK_ZWATCH_ALARM_10026": "重複するキー[%s]が異なる値{%s}を持っています", "ORG_ZSTACK_NETWORK_SERVICE_LB_10170": "共有ロードバランササーバーグループ%sにサーバーIPを追加できませんでした", "ORG_ZSTACK_ZWATCH_ALARM_10025": "メトリクスに、指定されたラベル[%s]がありません", - "ORG_ZSTACK_ZWATCH_ALARM_10023": "UUID [uuid:%s]のアラームに重複するラベルが定義されています", + "ORG_ZSTACK_ZWATCH_ALARM_10023": "重複するラベル[key:%s, operator:%s, value:%s]がアラーム[uuid:%s]に定義されています", "ORG_ZSTACK_ZWATCH_ALARM_10029": "メトリクス[%s]は管理者向けに制限されており、現在のユーザーロールでは利用できません", "ORG_ZSTACK_NETWORK_SERVICE_LB_10171": "vmincsとサーバーIPがnullのため、バックエンドサーバーを変更できませんでした", "ORG_ZSTACK_ZWATCH_ALARM_10028": "名前空間[%s]にはメトリクス[%s]が含まれていません", @@ -4731,4 +4731,4 @@ "ORG_ZSTACK_AI_10163": "VM「%s」(UUID: %s) はどのホストでも実行されていません", "ORG_ZSTACK_AI_10164": "モデル「%s」(UUID: %s) は VM の所属アカウントに共有されていない(または公開されていない)ため、マウントできません。", "ORG_ZSTACK_AI_10165": "モデルセンター (UUID: %s) が見つかりません(関連モデル: 「%s」UUID: %s)" -} \ No newline at end of file +} diff --git a/conf/i18n/globalErrorCodeMapping/global-error-ko-KR.json b/conf/i18n/globalErrorCodeMapping/global-error-ko-KR.json index e9f65cdc59f..69cb54db672 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-ko-KR.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-ko-KR.json @@ -845,7 +845,7 @@ "ORG_ZSTACK_ZWATCH_ALARM_10026": "중복된 키[%s]가 다른 값{%s}%과 함께 있습니다", "ORG_ZSTACK_NETWORK_SERVICE_LB_10170": "공유 로드 밸런서 서버 그룹 %s에 서버 IP를 추가할 수 없습니다", "ORG_ZSTACK_ZWATCH_ALARM_10025": "메트릭에 지정된 라벨[%s]이 없습니다", - "ORG_ZSTACK_ZWATCH_ALARM_10023": "UUID [uuid:%s]가 있는 알람에 중복된 라벨이 정의되어 있습니다", + "ORG_ZSTACK_ZWATCH_ALARM_10023": "중복된 라벨[key:%s, operator:%s, value:%s]이 알람[uuid:%s]에 정의되어 있습니다", "ORG_ZSTACK_ZWATCH_ALARM_10029": "메트릭[%s]은 관리자에게만 제한되어 있으며, 현재 사용자 역할에서는 사용할 수 없습니다", "ORG_ZSTACK_NETWORK_SERVICE_LB_10171": "vmincs와 서버 IP가 null이므로 백엔드 서버를 수정할 수 없습니다", "ORG_ZSTACK_ZWATCH_ALARM_10028": "네임스페이스[%s]에 메트릭[%s]이 포함되어 있지 않습니다", @@ -4731,4 +4731,4 @@ "ORG_ZSTACK_AI_10163": "VM「%s」(UUID: %s)는 어떤 호스트에서도 실행되고 있지 않습니다", "ORG_ZSTACK_AI_10164": "모델「%s」(UUID: %s)이(가) 이 VM이 속한 계정에 공유되어 있지 않습니다(또는 공개되지 않음). 마운트하려면 동일한 공유 규칙을 따르세요.", "ORG_ZSTACK_AI_10165": "모델 센터 (UUID: %s)를 찾을 수 없습니다 (관련 모델: 「%s」UUID: %s)" -} \ No newline at end of file +} diff --git a/conf/i18n/globalErrorCodeMapping/global-error-ru-RU.json b/conf/i18n/globalErrorCodeMapping/global-error-ru-RU.json index 0d532e7b392..445bb173b2e 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-ru-RU.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-ru-RU.json @@ -845,7 +845,7 @@ "ORG_ZSTACK_ZWATCH_ALARM_10026": "дублирующийся ключ[%s] с разными значениями{%s}%", "ORG_ZSTACK_NETWORK_SERVICE_LB_10170": "не удалось добавить IP сервера в группу серверов общего балансировщика нагрузки %s", "ORG_ZSTACK_ZWATCH_ALARM_10025": "метрика не содержит указанную метку[%s]", - "ORG_ZSTACK_ZWATCH_ALARM_10023": "дублирующаяся метка определена для сигнала тревоги с UUID [uuid:%s]", + "ORG_ZSTACK_ZWATCH_ALARM_10023": "дублирующаяся метка[key:%s, operator:%s, value:%s] определена для сигнала тревоги[uuid:%s]", "ORG_ZSTACK_ZWATCH_ALARM_10029": "метрика[%s] ограничена для администраторов и недоступна для вашей текущей роли пользователя.", "ORG_ZSTACK_NETWORK_SERVICE_LB_10171": "не удалось изменить backend-сервер, так как vmincs и IP-адреса серверов равны null", "ORG_ZSTACK_ZWATCH_ALARM_10028": "namespace[%s] не содержит метрику[%s]", @@ -4731,4 +4731,4 @@ "ORG_ZSTACK_AI_10163": "ВМ[имя:%s, uuid:%s] не запущена ни на одном хосте", "ORG_ZSTACK_AI_10164": "Модель[имя:%s, uuid:%s] не предоставлена аккаунту-владельцу этой ВМ (и не является публичной). Для монтирования модель должна быть доступна по тем же правилам, что и ВМ.", "ORG_ZSTACK_AI_10165": "ModelCenter[uuid:%s] не найден для модели[имя:%s, uuid:%s]" -} \ No newline at end of file +} diff --git a/conf/i18n/globalErrorCodeMapping/global-error-th-TH.json b/conf/i18n/globalErrorCodeMapping/global-error-th-TH.json index 92f456b608b..254a86ee931 100644 --- a/conf/i18n/globalErrorCodeMapping/global-error-th-TH.json +++ b/conf/i18n/globalErrorCodeMapping/global-error-th-TH.json @@ -845,7 +845,7 @@ "ORG_ZSTACK_ZWATCH_ALARM_10026": "รหัสซ้ำ[%s] พร้อมค่าที่แตกต่างกัน{%s}%", "ORG_ZSTACK_NETWORK_SERVICE_LB_10170": "ไม่สามารถเพิ่ม IP เซิร์ฟเวอร์ไปยังกลุ่มเซิร์ฟเวอร์ load balancer ที่แชร์ได้ %s", "ORG_ZSTACK_ZWATCH_ALARM_10025": "เมทริกไม่มีป้ายกำกับที่ระบุ[%s]", - "ORG_ZSTACK_ZWATCH_ALARM_10023": "มีการกำหนดป้ายกำกับซ้ำสำหรับ alarm ที่มี UUID [uuid:%s]", + "ORG_ZSTACK_ZWATCH_ALARM_10023": "ป้ายกำกับซ้ำ[key:%s, operator:%s, value:%s] สำหรับ alarm[uuid:%s]", "ORG_ZSTACK_ZWATCH_ALARM_10029": "เมทริก[%s] จำกัดสำหรับผู้ดูแลระบบและไม่พร้อมใช้งานสำหรับบทบาทผู้ใช้ปัจจุบันของคุณ", "ORG_ZSTACK_NETWORK_SERVICE_LB_10171": "ไม่สามารถแก้ไขเซิร์ฟเวอร์แบ็กเอนด์ได้เนื่องจาก vmincs และ IP เซิร์ฟเวอร์เป็นค่าว่าง", "ORG_ZSTACK_ZWATCH_ALARM_10028": "namespace[%s] ไม่มีเมทริก[%s]", @@ -4731,4 +4731,4 @@ "ORG_ZSTACK_AI_10163": "VM「%s」(UUID: %s) ไม่ได้ทำงานอยู่บนโฮสต์ใด ๆ", "ORG_ZSTACK_AI_10164": "โมเดล「%s」(UUID: %s) ไม่ได้แชร์ให้บัญชีของ VM นี้ (หรือสาธารณะ) การ mount ต้องเข้าถึงได้ตามกฎการแชร์เดียวกับ VM", "ORG_ZSTACK_AI_10165": "ไม่พบ ModelCenter[uuid:%s] สำหรับโมเดล[name:%s, uuid:%s]" -} \ No newline at end of file +} diff --git a/conf/i18n/messages_zh_CN.properties b/conf/i18n/messages_zh_CN.properties index 8bc97465306..9261453387f 100755 --- a/conf/i18n/messages_zh_CN.properties +++ b/conf/i18n/messages_zh_CN.properties @@ -14630,9 +14630,9 @@ action[uuid\:%s,\ type\:%s]\ not\ found = 找不到报警动作[uuid:{0}, 类型 # args: msg.getActionUuid(),msg.getActionType(),msg.getAlarmUuid() duplicated\ action[uuid\:%s,\ type\:%s]\ for\ the\ alarm[uuid\:%s] = 报警器[uuid:{2}]已经存在报警动作[uuid:{0}, 类型:{1}] -# at: src/main/java/org/zstack/zwatch/alarm/AlarmApiInterceptor.java:296 -# args: msg.getKey(),msg.getOperator(),msg.getValue(),msg.getAlarmUuid() -duplicate\ label[key\:%s,\ operator\:%s,\ value\:%s]\ for\ the\ alarm[uuid\:%s] = 报警器[uuid:{2}]已经存在标签[key:{0}, operator:{1}, value:{2}] +# at: src/main/java/org/zstack/zwatch/alarm/AlarmApiInterceptor.java:314 +# args: key,operator,value,alarmUuid +duplicate\ label[key\:%s,\ operator\:%s,\ value\:%s]\ for\ the\ alarm[uuid\:%s] = 报警器[uuid:{3}]已经存在标签[key:{0}, operator:{1}, value:{2}] # at: src/main/java/org/zstack/zwatch/alarm/AlarmApiInterceptor.java:390 # args: msg.getNamespace()