feat: Add option to retry only on status code failure for JSON Query monitors (#5693) (#6687)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
SID
2026-01-12 16:49:43 +01:00
committed by GitHub
co-authored by autofix-ci[bot]
parent 2b2941cd83
commit c7a8b7affd
5 changed files with 64 additions and 5 deletions
+2
View File
@@ -86,6 +86,8 @@
"resendEveryXTimes": "Resend every {0} times",
"resendDisabled": "Resend disabled",
"retriesDescription": "Maximum retries before the service is marked as down and a notification is sent",
"Only retry if status code check fails": "Only retry if status code check fails",
"retryOnlyOnStatusCodeFailureDescription": "If enabled, retries will only occur when the HTTP status code check fails (e.g., server is down). If the status code check passes but the JSON query fails, the monitor will be marked as down immediately without retries.",
"ignoredTLSError": "TLS/SSL errors have been ignored",
"ignoreTLSError": "Ignore TLS/SSL errors for HTTPS websites",
"ignoreTLSErrorGeneral": "Ignore TLS/SSL error for connection",
+19
View File
@@ -1167,6 +1167,24 @@
</div>
</div>
<!-- Retry only on status code failure: JSON Query only -->
<div v-if="monitor.type === 'json-query' && monitor.maxretries > 0" class="my-3">
<div class="form-check">
<input
id="retry-only-on-status-code-failure"
v-model="monitor.retryOnlyOnStatusCodeFailure"
type="checkbox"
class="form-check-input"
/>
<label for="retry-only-on-status-code-failure" class="form-check-label">
{{ $t("Only retry if status code check fails") }}
</label>
</div>
<div class="form-text">
{{ $t("retryOnlyOnStatusCodeFailureDescription") }}
</div>
</div>
<!-- Timeout: HTTP / JSON query / Keyword / Ping / RabbitMQ / SNMP / Websocket Upgrade only -->
<div
v-if="
@@ -2158,6 +2176,7 @@ const monitorDefaults = {
retryInterval: 60,
resendInterval: 0,
maxretries: 0,
retryOnlyOnStatusCodeFailure: false,
notificationIDList: {},
ignoreTls: false,
upsideDown: false,