update rrd locations

git-svn-id: http://www.observium.org/svn/observer/trunk@139 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-03-12 13:55:50 +00:00
parent 729adc0da0
commit 544180decc
9 changed files with 119 additions and 78 deletions

View File

@@ -1,7 +1,14 @@
<?
$cpurrd = "rrd/" . $device['hostname'] . "-cpu.rrd";
$memrrd = "rrd/" . $device['hostname'] . "-mem.rrd";
$Ocpurrd = "rrd/" . $hostname . "-cpu.rrd";
$Omemrrd = "rrd/" . $hostname . "-mem.rrd";
$cpurrd = $rrd_dir . "/" . $hostname . "/cpu.rrd";
$memrrd = $rrd_dir . "/" . $hostname . "/mem.rrd";
if(is_file($Ocpurrd) && !is_file($cpurrd)) { rename($Ocpurrd, $cpurrd); echo("Moving $Ocpurrd to $cpurrd"); }
if(is_file($Omemrrd) && !is_file($memrrd)) { rename($Omemrrd, $memrrd); echo("Moving $Omemrrd to $memrrd"); }
$cpu_cmd = "snmpget -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] . " 1.3.6.1.4.1.11.2.14.11.5.1.9.6.1.0";
$cpu = `$cpu_cmd`;