Change VSPC plugin to work a bit better with certain attribute changes.
This commit is contained in:
parent
1235b37acd
commit
ba3b406407
@ -196,6 +196,9 @@ def process(mAgents, bAgents, jobs, managed):
|
|||||||
if failureMessage:
|
if failureMessage:
|
||||||
# We use 2.2 here to give wiggle room for jobs to complete if
|
# We use 2.2 here to give wiggle room for jobs to complete if
|
||||||
# they take longer than expected.
|
# they take longer than expected.
|
||||||
|
#
|
||||||
|
# NB: we assume here that lastEndTime was set if there's a
|
||||||
|
# failureMessage.
|
||||||
results[host].append({
|
results[host].append({
|
||||||
"status": CRIT if daysSinceLastRun > 2.2 else WARN,
|
"status": CRIT if daysSinceLastRun > 2.2 else WARN,
|
||||||
"message": f"Backup agent {bAgentId} job {jobId} failed {daysSinceLastRun:.1f} days ago: {failureMessage}"
|
"message": f"Backup agent {bAgentId} job {jobId} failed {daysSinceLastRun:.1f} days ago: {failureMessage}"
|
||||||
@ -209,13 +212,7 @@ def process(mAgents, bAgents, jobs, managed):
|
|||||||
})
|
})
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not daysSinceLastRun:
|
if daysSinceLastRun is not None:
|
||||||
results[host].append({
|
|
||||||
"status": OK,
|
|
||||||
"message": f"Backup agent {bAgentId} is healthy; no backups yet."
|
|
||||||
})
|
|
||||||
continue
|
|
||||||
|
|
||||||
# We use 1.2 & 2.2 here to give wiggle room for jobs to complete if
|
# We use 1.2 & 2.2 here to give wiggle room for jobs to complete if
|
||||||
# they take longer than expected.
|
# they take longer than expected.
|
||||||
if daysSinceLastRun > 2.2:
|
if daysSinceLastRun > 2.2:
|
||||||
|
|||||||
Binary file not shown.
BIN
vspc_backup_checks/2.3/vspc_backup_checks-0.2.1.mkp
Executable file
BIN
vspc_backup_checks/2.3/vspc_backup_checks-0.2.1.mkp
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user