From 226ec5c6a190dc21481ab3819b1299fd87591d34 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 3 Jun 2024 13:03:14 +0200 Subject: [PATCH] Update handling of value assignment when 'jsonelem' is not set. - Adjusted code to assign $output directly to 'value' if 'jsonelem' is not set. --- index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.php b/index.php index 756e331..1fa3baf 100644 --- a/index.php +++ b/index.php @@ -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; } }