diff --git a/html/includes/graphs/device_cpu_unix.inc.php b/html/includes/graphs/device_cpu_unix.inc.php index 9513ef7e7..cf5cdbd2d 100644 --- a/html/includes/graphs/device_cpu_unix.inc.php +++ b/html/includes/graphs/device_cpu_unix.inc.php @@ -30,10 +30,11 @@ $scale_max = "100"; $nototal = 1; +if ($rrd_list) { + include ("generic_multi_line.inc.php"); -if ($not) { - +} else { include("common.inc.php"); $rrd_filename = $config['rrd_dir'] . "/" . $hostname . "/" . "ucd_cpu.rrd"; $rrd_options .= " DEF:user=$rrd_filename:user:AVERAGE"; diff --git a/includes/functions-poller.inc.php b/includes/functions-poller.inc.php index cf8d0986d..de824c4af 100644 --- a/includes/functions-poller.inc.php +++ b/includes/functions-poller.inc.php @@ -43,7 +43,7 @@ global $config; $this_index = trim($this_index); $this_oid = trim($this_oid); $this_value = trim($this_value); - if(!strstr($this_value, "No Such Instance currently exists at this OID") && $this_index) { + if(!strstr($this_value, "at this OID") && $this_index) { $array[] = $this_value; } } @@ -62,7 +62,7 @@ function snmpwalk_cache_oid($oid, $device, $array, $mib = 0) { list($oid,$value) = explode("=", $entry); $oid = trim($oid); $value = trim($value); list($oid, $index) = explode(".", $oid); - if (!strstr($this_value, "No Such Instance currently exists at this OID") && $oid && $index) { + if (!strstr($this_value, "at this OID") && $oid && $index) { $array[$device_id][$index][$oid] = $value; } } @@ -81,7 +81,7 @@ function snmpwalk_cache_twopart_oid($oid, $device, $array, $mib = 0) { list($oid,$value) = explode("=", $entry); $oid = trim($oid); $value = trim($value); list($oid, $first, $second) = explode(".", $oid); - if (!strstr($this_value, "No Such Instance currently exists at this OID") && $oid && $first && $second) { + if (!strstr($this_value, "at this OID") && $oid && $first && $second) { $array[$device_id][$first][$second][$oid] = $value; } } @@ -124,7 +124,7 @@ function snmp_cache_oid($oid, $device, $array, $mib = 0) { $this_index = trim($this_index); $this_oid = trim($this_oid); $this_value = trim($this_value); - if(!strstr($this_value, "No Such Instance currently exists at this OID") && $this_index) { + if(!strstr($this_value, "at this OID") && $this_index) { $array[$device_id][$this_index][$this_oid] = $this_value; } $array[$device_id][$oid] = '1'; @@ -145,7 +145,7 @@ function snmp_cache_port_oids($oids, $port, $device, $array, $mib=0) { $values = explode("\n", $data); #echo("Caching: ifIndex $port\n"); foreach($oids as $oid){ - if(!strstr($values[$x], "No Such Instance currently exists at this OID")) { + if(!strstr($values[$x], "at this OID")) { $array[$device[device_id]][$port][$oid] = $values[$x]; } $x++; diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index 5d1bcd7cd..668b3913e 100755 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -77,7 +77,7 @@ $update .= ", `poll_period` = '".$polled_period."'"; /// Copy ifHC[In|Out]Octets values to non-HC if they exist - if(isset($this_port['ifHCInOctets']) && isset($this_port['ifHCOutOctets'])) { + if(is_numeric($this_port['ifHCInOctets']) && is_numeric($this_port['ifHCOutOctets'])) { echo("HC "); $this_port['ifInOctets'] = $this_port['ifHCInOctets']; $this_port['ifOutOctets'] = $this_port['ifHCOutOctets'];