fix: Strip " from memcached application + pass string to update_application() (#6725)

This commit is contained in:
Neil Lathwood
2017-05-25 13:35:20 +01:00
committed by Tony Murray
parent f24751e231
commit 6d0e5794b2

View File

@ -9,11 +9,12 @@ if (!empty($agent_data['app']['memcached'])) {
} else {
$oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.9.109.101.109.99.97.99.104.101.100';
$result = snmp_get($device, $oid, '-Oqv');
$result = trim($result, '"');
$result = unserialize(stripslashes(str_replace("<<<app-memcached>>>\n", '', $result)));
$data = reset($result);
}
update_application($app, $data);
update_application($app, $data['pid']);
echo ' memcached('.$app['app_instance'].')';
$rrd_name = array('app', $name, $app_id);