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:
parent
7aef1769d9
commit
d0fa8a6a99
@ -16,6 +16,8 @@ if($_SERVER["REQUEST_URI"] == '/metrics') {
|
|||||||
}
|
}
|
||||||
if(isset($c['jsonelem'])) {
|
if(isset($c['jsonelem'])) {
|
||||||
$c['value'] = getArrayValue($c['jsonelem'], json_decode($output, true));
|
$c['value'] = getArrayValue($c['jsonelem'], json_decode($output, true));
|
||||||
|
} else {
|
||||||
|
$c['value'] = $output;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user