Change VSPC plugin to work a bit better with certain attribute changes.

This commit is contained in:
Marsell Kukuljevic 2026-05-28 11:30:14 +02:00
parent 1235b37acd
commit ba3b406407
3 changed files with 21 additions and 24 deletions

View File

@ -196,6 +196,9 @@ def process(mAgents, bAgents, jobs, managed):
if failureMessage:
# We use 2.2 here to give wiggle room for jobs to complete if
# they take longer than expected.
#
# NB: we assume here that lastEndTime was set if there's a
# failureMessage.
results[host].append({
"status": CRIT if daysSinceLastRun > 2.2 else WARN,
"message": f"Backup agent {bAgentId} job {jobId} failed {daysSinceLastRun:.1f} days ago: {failureMessage}"
@ -209,13 +212,7 @@ def process(mAgents, bAgents, jobs, managed):
})
continue
if not daysSinceLastRun:
results[host].append({
"status": OK,
"message": f"Backup agent {bAgentId} is healthy; no backups yet."
})
continue
if daysSinceLastRun is not None:
# We use 1.2 & 2.2 here to give wiggle room for jobs to complete if
# they take longer than expected.
if daysSinceLastRun > 2.2:

Binary file not shown.