From 0b460d246ffcf03c6861c55bd7ba973d517c3c99 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Thu, 11 Nov 2021 17:55:44 +0100 Subject: [PATCH] Autodetect monitoring format --- datastore/linstor_un/linstor_un.conf | 4 ---- datastore/linstor_un/linstor_utils.sh | 9 +++++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/datastore/linstor_un/linstor_un.conf b/datastore/linstor_un/linstor_un.conf index 7637132..003a69e 100644 --- a/datastore/linstor_un/linstor_un.conf +++ b/datastore/linstor_un/linstor_un.conf @@ -29,7 +29,3 @@ DD_CONV=sparse # temporarily during the create/mkfs processes. This directoy MUST exist, # have enough space and be writeable by 'oneadmin' STAGING_DIR=/var/tmp - -# OpenNebula 5.12+ changed the monitoring data format -# Set to 1 for OpenNebula 5.10 and below -#LEGACY_MONITORING=1 diff --git a/datastore/linstor_un/linstor_utils.sh b/datastore/linstor_un/linstor_utils.sh index 3089240..0c482e7 100644 --- a/datastore/linstor_un/linstor_utils.sh +++ b/datastore/linstor_un/linstor_utils.sh @@ -35,6 +35,11 @@ linstor_monitor_storpool() { # @param $3 the ID of system datastore (to monitor) #-------------------------------------------------------------------------------- linstor_monitor_resources() { + if [ -d "${0%/*}/../../im/kvm-probes.d/vm/monitor" ]; then + MONITOR_TAG=MONITOR + else + MONITOR_TAG=POLL + fi echo "$1" "$2" | $JQ -rs "$(cat <