Skip to content

Commit

Permalink
improve poller (refresh $device array when we start a new device, so …
Browse files Browse the repository at this point in the history
…we don't get issues with overlap) remove old crap from catos poller, add CISCO-CEF mibs

git-svn-id: http://www.observium.org/svn/observer/trunk@1619 61d68cd4-352d-0410-923a-c4978735b2b8
  • Loading branch information
adama committed Aug 2, 2010
1 parent 0307d59 commit 5d338cc
Show file tree
Hide file tree
Showing 5 changed files with 3,422 additions and 41 deletions.
2 changes: 1 addition & 1 deletion includes/defaults.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
### Ignores & Allows

$config['bad_if'] = array("voip-null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "lp0", "faith0",
"-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm", "container",
"-atm layer", "-atm subif", "-shdsl", "-aal5", "-atm", "container",
"async", "plip", "-physical", "-signalling", "control", "container", "unrouted",
"bri", "-bearer", "bluetooth", "isatap", "ras", "qos", "miniport", "sonet/sdh",
"span rp", "span sp", "sslvpn");
Expand Down
38 changes: 0 additions & 38 deletions includes/polling/os/catos.inc.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<?php

$community = $device['community'];
$id = $device['device_id'];
$hostname = $device['hostname'];
$port = $device['port'];
$snmpver = $device['snmpver'];

$temprrd = $config['rrd_dir'] . "/" . $hostname . "/temp.rrd";
$cpurrd = $config['rrd_dir'] . "/" . $hostname . "/cpu.rrd";
$memrrd = $config['rrd_dir'] . "/" . $hostname . "/mem.rrd";

if(strstr($ciscomodel, "OID")){ unset($ciscomodel); }
if(!strstr($ciscomodel, " ") && strlen($ciscomodel) >= '3') {
$hardware = $ciscomodel;
Expand All @@ -23,32 +13,4 @@
list(,$features) = explode("-", $features);




list ($cpu5m, $cpu5s) = explode("\n", shell_exec($config['snmpget'] . " -M ".$config['mibdir'] . " -m OLD-CISCO-CPU-MIB -O qv -$snmpver -c $community $hostname:$port 1.3.6.1.4.1.9.2.1.58.0 1.3.6.1.4.1.9.2.1.56.0"));
$cpu5m = $cpu5m + 0;
$cpu5s = $cpu5s + 0;

echo("$hostname\n");

if (!is_file($cpurrd)) {
$rrdcreate = `rrdtool create $cpurrd --step 300 \
DS:LOAD5S:GAUGE:600:-1:100 \
DS:LOAD5M:GAUGE:600:-1:100 \
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`;
}

rrdtool_update($cpurrd, "N:$cpu5s:$cpu5m");

include("includes/polling/cisco-processors.inc.php");
include("includes/polling/cisco-mempool.inc.php");
include("includes/polling/cisco-entity-sensors.inc.php");

?>
Loading

0 comments on commit 5d338cc

Please sign in to comment.