Fixing lots of bugs and fixing billing

git-svn-id: http://www.observium.org/svn/observer/trunk@129 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-03-09 21:13:27 +00:00
parent 062a0399bd
commit ab77b6e2f1
16 changed files with 288 additions and 61 deletions

View File

@@ -10,6 +10,10 @@ include("graphing.php");
include("print-functions.php");
include("billing-functions.php");
function rrdtool_update($rrdfile, $rrdupdate) {
global $rrdtool;
return `$rrdtool update $rrdfile $rrdupdate`;
}
function strgen ($length = 8)
{
@@ -542,7 +546,7 @@ function createHost ($host, $community, $snmpver){
$host_os = getHostOS($host, $community, $snmpver);
global $valid_os;
$nullhost = 1;
echo("$host -> $host_os<br />");
#echo("$host -> $host_os<br />");
foreach($valid_os as $os) {
if ($os == $host_os) {
$nullhost = '0';
@@ -550,9 +554,9 @@ function createHost ($host, $community, $snmpver){
}
if($nullhost == '0') {
$sql = mysql_query("INSERT INTO `devices` (`hostname`, `community`, `os`, `status`) VALUES ('$host', '$community', '$host_os', '1')");
echo("Created host : $host\n");
return("Created host : $host ($host_os)");
} else {
echo("Not added bad host : $host\n");
return("Not added bad host : $host");
}
}