Update handling of value assignment when 'jsonelem' is not set.

- Adjusted code to assign $output directly to 'value' if 'jsonelem' is not set.
This commit is contained in:
Jeroen De Meerleer 2024-06-03 13:03:14 +02:00
parent 7c79ea3b6b
commit 226ec5c6a1
No known key found for this signature in database
GPG Key ID: 3B23D1B3498D7641

View File

@ -16,6 +16,8 @@ if($_SERVER["REQUEST_URI"] == '/metrics') {
}
if(isset($c['jsonelem'])) {
$c['value'] = getArrayValue($c['jsonelem'], json_decode($output, true));
} else {
$c['value'] = $output;
}
}