fix(xo-server/_handleBackupLog): bail instead of failing if Nagios plugin is not loaded

Introduced by ed34d9cbc
This commit is contained in:
Julien Fontanet
2022-12-08 17:05:30 +01:00
parent 0552dc23a5
commit ba782d2698
2 changed files with 7 additions and 0 deletions

View File

@@ -27,4 +27,6 @@
<!--packages-start-->
- xo-server patch
<!--packages-end-->

View File

@@ -5,6 +5,11 @@ import { createLogger } from '@xen-orchestra/log'
const { warn } = createLogger('xo:server:handleBackupLog')
async function sendToNagios(app, jobName, vmBackupInfo) {
if (app.sendPassiveCheck !== undefined) {
// Nagios plugin is not loaded
return
}
try {
const messageToNagios = {
id: vmBackupInfo.id,