From 359d5004f2946ea345befabd05f3a8119dca45ae Mon Sep 17 00:00:00 2001 From: Simon Mott Date: Thu, 23 Mar 2017 08:26:22 +0000 Subject: [PATCH] remove quotes from snmp result #6239 (#6244) * remove quotes from snmp result #6239 * add some spaces --- includes/polling/applications/ntp-client.inc.php | 1 + includes/polling/applications/ntp-server.inc.php | 1 + 2 files changed, 2 insertions(+) diff --git a/includes/polling/applications/ntp-client.inc.php b/includes/polling/applications/ntp-client.inc.php index d7f62349e5..229a4ea7cd 100644 --- a/includes/polling/applications/ntp-client.inc.php +++ b/includes/polling/applications/ntp-client.inc.php @@ -7,6 +7,7 @@ $name = 'ntp-client'; $app_id = $app['app_id']; $oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.10.110.116.112.45.99.108.105.101.110.116'; $ntpclient = snmp_get($device, $oid, '-Oqv'); +$ntpclient = str_replace('"', '', $ntpclient); update_application($app, $ntpclient); echo ' '.$name; diff --git a/includes/polling/applications/ntp-server.inc.php b/includes/polling/applications/ntp-server.inc.php index 5ba1c8792b..216709d243 100644 --- a/includes/polling/applications/ntp-server.inc.php +++ b/includes/polling/applications/ntp-server.inc.php @@ -7,6 +7,7 @@ $name = 'ntp-server'; $app_id = $app['app_id']; $oid = '.1.3.6.1.4.1.8072.1.3.2.3.1.2.10.110.116.112.45.115.101.114.118.101.114'; $ntpserver_data = snmp_get($device, $oid, '-Oqv'); +$ntpserver_data = str_replace('"', '', $ntpserver_data); update_application($app, $ntpserver_data); list ($stratum, $offset, $frequency, $jitter, $noise, $stability, $uptime, $buffer_recv, $buffer_free, $buffer_used, $packets_drop, $packets_ignore, $packets_recv, $packets_sent) = explode("\n", $ntpserver_data);