a million fixes. half way to 0.6.0! :D

git-svn-id: http://www.observium.org/svn/observer/trunk@407 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-04-23 21:13:56 +00:00
parent 35bc68a0d9
commit bc6ad69724
26 changed files with 616 additions and 406 deletions
+5 -3
View File
@@ -14,7 +14,7 @@ if($device[os] != "Snom") {
$rrdfile = $config['rrd_dir'] . "/" . $device['hostname'] . "/netinfo.rrd";
$rrd_create = "rrdtool create $rrdfile ";
$rrd_create = $config['rrdtool'] . " create $rrdfile ";
$rrd_create .= "RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797";
@@ -23,8 +23,10 @@ if($device[os] != "Snom") {
$snmpstring .= " $oid.0";
}
if(!file_exists($rrdfile)) { `$rrd_create`; }
$snmpdata_cmd = "snmpget -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " $snmpstring";
if(!file_exists($rrdfile)) {
shell_exec($rrd_create);
}
$snmpdata_cmd = "snmpget -m IP-MIB:SNMPv2-MIB:UDP-MIB:TCP-MIB:IP-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " $snmpstring";
$snmpdata = trim(`$snmpdata_cmd`);
$rrdupdate = "N";
foreach(explode("\n", $snmpdata) as $data) {