2009-09-07 11:07:59 +00:00
|
|
|
<?php
|
2007-04-08 18:09:08 +00:00
|
|
|
|
2010-07-30 13:54:00 +00:00
|
|
|
list($hardware, $version, $features) = explode(",", str_replace(", ", ",", $sysDescr));
|
|
|
|
list($features) = explode("(", $version);
|
2007-04-08 18:09:08 +00:00
|
|
|
|
2010-07-30 13:54:00 +00:00
|
|
|
$fdb_rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/fdb_count.rrd";
|
2010-07-30 13:35:58 +00:00
|
|
|
|
2010-07-30 13:54:00 +00:00
|
|
|
$FdbAddressCount = snmp_get ($device, "hpSwitchFdbAddressCount.0", "-Ovqn", "STATISTICS-MIB", $config['mib_dir'].":".$config['mib_dir']."/hp");
|
2010-07-30 13:35:58 +00:00
|
|
|
|
2010-07-30 13:54:00 +00:00
|
|
|
if(is_numeric($FdbAddressCount))
|
|
|
|
{
|
2007-04-08 18:09:08 +00:00
|
|
|
|
2010-07-30 13:54:00 +00:00
|
|
|
if (!is_file($fdb_rrd_file))
|
|
|
|
{
|
|
|
|
rrdtool_create($fdb_rrd_file, " --step 300 \
|
|
|
|
DS:value:GAUGE:600:-1:100000 \
|
|
|
|
RRA:AVERAGE:0.5:1:1200 \
|
|
|
|
RRA:AVERAGE:0.5:1:2000 \
|
2009-11-24 23:58:56 +00:00
|
|
|
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");
|
2010-07-30 13:54:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
rrdtool_update($fdb_rrd_file, "N:$FdbAddressCount");
|
|
|
|
|
|
|
|
$graphs['fdb_count'] = TRUE;
|
2007-04-08 18:09:08 +00:00
|
|
|
|
2010-07-30 13:54:00 +00:00
|
|
|
echo("FDB Count ");
|
|
|
|
|
|
|
|
}
|
2007-04-08 18:09:08 +00:00
|
|
|
|
|
|
|
?>
|