add some mibs, update snmp functions

git-svn-id: http://www.observium.org/svn/observer/trunk@1458 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-22 21:58:49 +00:00
parent f09b9c4d63
commit e220114f4c
59 changed files with 13439 additions and 176 deletions
-23
View File
@@ -12,27 +12,4 @@ if (strstr($hardware,"No Such Object available"))
$hardware = $sysDescr;
}
$cpurrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/powerconnect-cpu.rrd";
$cpu_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -m RADLAN-rndMng -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'];
$cpu_cmd .= " RADLAN-rndMng::rlCpuUtilDuringLastSecond.0";
$cpu_usage = trim(shell_exec($cpu_cmd));
if (!is_file($cpurrd)) {
$rrdcreate = shell_exec($config['rrdtool'] ." create $cpurrd --step 300 DS:LOAD:GAUGE:600:-1:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:1:2000 \
RRA:AVERAGE:0.5:6:2000 \
RRA:AVERAGE:0.5:24:2000 \
RRA:AVERAGE:0.5:288:2000 \
RRA:MAX:0.5:1:2000 \
RRA:MAX:0.5:6:2000 \
RRA:MAX:0.5:24:2000 \
RRA:MAX:0.5:288:2000 \
RRA:MIN:0.5:1:2000 \
RRA:MIN:0.5:6:2000 \
RRA:MIN:0.5:24:2000 \
RRA:MIN:0.5:288:2000");
}
rrdtool_update($cpurrd, "N:$cpu_usage");
?>