fix(xo-server/_handleBackupLog): bail instead of failing if Nagios plugin is not loaded
Introduced by ed34d9cbc
This commit is contained in:
@@ -27,4 +27,6 @@
|
|||||||
|
|
||||||
<!--packages-start-->
|
<!--packages-start-->
|
||||||
|
|
||||||
|
- xo-server patch
|
||||||
|
|
||||||
<!--packages-end-->
|
<!--packages-end-->
|
||||||
|
|||||||
@@ -5,6 +5,11 @@ import { createLogger } from '@xen-orchestra/log'
|
|||||||
const { warn } = createLogger('xo:server:handleBackupLog')
|
const { warn } = createLogger('xo:server:handleBackupLog')
|
||||||
|
|
||||||
async function sendToNagios(app, jobName, vmBackupInfo) {
|
async function sendToNagios(app, jobName, vmBackupInfo) {
|
||||||
|
if (app.sendPassiveCheck !== undefined) {
|
||||||
|
// Nagios plugin is not loaded
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const messageToNagios = {
|
const messageToNagios = {
|
||||||
id: vmBackupInfo.id,
|
id: vmBackupInfo.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user