diff --git a/includes/influxdb.inc.php b/includes/influxdb.inc.php index 7f490c7e67..85694953a9 100644 --- a/includes/influxdb.inc.php +++ b/includes/influxdb.inc.php @@ -48,6 +48,10 @@ function influx_update($device,$measurement,$tags=array(),$fields) { $tmp_fields = array(); $tmp_tags['hostname'] = $device['hostname']; foreach ($tags as $k => $v) { + $v = preg_replace(array('/ /','/,/','/=/'),array('\ ','\,','\='), $v); + if (empty($v)) { + $v = '_blank_'; + } $tmp_tags[$k] = $v; } foreach ($fields as $k => $v) { diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index b0cc451c7c..ba6b186b91 100644 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -486,7 +486,7 @@ foreach ($ports as $port) { $fields['ifInOctets_rate'] = $port['ifInOctets_rate']; $fields['ifOutOctets_rate'] = $port['ifOutOctets_rate']; - $tags = array('ifName' => '"'.$port['ifName'].'"', 'ifSpeed' => '"'.$port['ifSpeed'].'"', 'port_descr_type' => '"'.$port['port_descr_type'].'"'); + $tags = array('ifName' => $port['ifName'], 'port_descr_type' => $port['port_descr_type']); influx_update($device,'ports',$tags,$fields); // End Update IF-MIB