From 62167ebcb2cbf8a8fead876c895f1b8e3b90412f Mon Sep 17 00:00:00 2001 From: Martijn Schmidt Date: Sun, 26 May 2019 12:52:45 +0200 Subject: [PATCH] Dynamic entPhysicalIndex values for YamlDiscovery --- includes/discovery/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 447f0dc467..dd4b1c25fe 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -1093,7 +1093,7 @@ function discovery_process(&$valid, $device, $sensor_type, $pre_cache) } echo "Cur $value, Low: $low_limit, Low Warn: $low_warn_limit, Warn: $warn_limit, High: $high_limit".PHP_EOL; - $entPhysicalIndex = str_replace('{{ $index }}', $index, $data['entPhysicalIndex']) ?: null; + $entPhysicalIndex = YamlDiscovery::replaceValues('entPhysicalIndex', $index, null, $data, $pre_cache); $entPhysicalIndex_measured = isset($data['entPhysicalIndex_measured']) ? $data['entPhysicalIndex_measured'] : null; $sensor_name = $device['os'];