fixing things!

git-svn-id: http://www.observium.org/svn/observer/trunk@182 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-03-22 13:57:16 +00:00
parent 5f150804a0
commit 27060c2da5
3 changed files with 9 additions and 27 deletions

View File

@@ -549,15 +549,7 @@ function fixIOSHardware($hardware){
function createHost ($host, $community, $snmpver){
$host = trim(strtolower($host));
$host_os = getHostOS($host, $community, $snmpver);
global $valid_os;
#$nullhost = 1;
#echo("$host -> $host_os<br />");
#foreach($valid_os as $os) {
# if ($os == $host_os) {
$nullhost = '0';
# }
#}
if($nullhost == '0' && $host_os) {
if($host_os) {
$sql = mysql_query("INSERT INTO `devices` (`hostname`, `community`, `os`, `status`) VALUES ('$host', '$community', '$host_os', '1')");
return("Created host : $host ($host_os)");
} else {

View File

@@ -21,7 +21,7 @@ function graph_netscreen_sessions ($rrd, $graph, $from, $to, $width, $height, $t
}
function graph_netscreen_cpu ($rrd, $graph, $from, $to, $width, $height, $title, $vertical) {
global $config, $rrdtool, $installdir, $mono_font, $rrd_dir;
global $config;
$database = $config['rrd_dir'] . "/" . $rrd;
$imgfile = "graphs/" . "$graph";
$period = $to - $from;