mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
git-svn-id: http://www.observium.org/svn/observer/trunk@2233 61d68cd4-352d-0410-923a-c4978735b2b8
38 lines
1.2 KiB
PHP
Executable File
38 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
list($hardware, $version, $features) = explode(",", str_replace(", ", ",", $poll_device[sysDescr]));
|
|
list($features) = explode("(", $version);
|
|
|
|
$fdb_rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/fdb_count.rrd";
|
|
|
|
$FdbAddressCount = snmp_get ($device, "hpSwitchFdbAddressCount.0", "-Ovqn", "STATISTICS-MIB");
|
|
|
|
if (is_numeric($FdbAddressCount))
|
|
{
|
|
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 \
|
|
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($fdb_rrd_file, "N:$FdbAddressCount");
|
|
|
|
$graphs['fdb_count'] = TRUE;
|
|
|
|
echo("FDB Count ");
|
|
}
|
|
|
|
?>
|