Skip to content

Commit

Permalink
watchguard firebox detection and cpu support
Browse files Browse the repository at this point in the history
git-svn-id: http://www.observium.org/svn/observer/trunk@2782 61d68cd4-352d-0410-923a-c4978735b2b8
  • Loading branch information
adama committed Dec 14, 2011
1 parent e7e6263 commit 2421e50
Show file tree
Hide file tree
Showing 29 changed files with 9,902 additions and 4 deletions.
2 changes: 0 additions & 2 deletions html/includes/graphs/application/mailscanner_reject.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
$i++;
$x++;
}
} else {
echo("file missing: $file");
}

include("includes/graphs/generic_multi_line.inc.php");
Expand Down
2 changes: 0 additions & 2 deletions html/includes/graphs/application/mailscanner_spam.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
$rrd_list[$i]['colour'] = $vars['colour'];
$i++;
}
} else {
echo("file missing: $file");
}

include("includes/graphs/generic_multi_simplex_seperated.inc.php");
Expand Down
8 changes: 8 additions & 0 deletions includes/discovery/os/watchguard.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

if (!$os)
{
if (preg_match("/^WatchGuard\ Fireware/", $sysDescr)) { $os = "firebox"; }
}

?>
23 changes: 23 additions & 0 deletions includes/discovery/processors/watchguard.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

##
## Hardcoded discovery of cpu usage on WatchGuard devices.
##
## WATCHGUARD-SYSTEM-STATISTICS-MIB::wgSystemCpuUtil5.0 = COUNTER: 123

if ($device['os'] == "firebox")
{
echo("Watchguard Firebox : ");

$descr = "Processor";
$usage = snmp_get($device, ".1.3.6.1.4.1.3097.6.3.78.0", "-OQUvs", "WATCHGUARD-SYSTEM-STATISTICS-MIB", $config['mib_dir'].":".$config['mib_dir']."/watchguard");

if (is_numeric($usage))
{
discover_processor($valid['processor'], $device, "1.3.6.1.4.1.3097.6.3.78.0", "0", "firebox-fixed", $descr, "100", $usage, NULL, NULL);
}
}

unset ($processors_array);

?>
10 changes: 10 additions & 0 deletions includes/polling/os/firebox.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

preg_match("/v(.*)/", $poll_device['sysDescr'], $matches);

$version = (isset($matches[1]) ? $matches[1] : "");
//$hardware = "Still need to figger hardware out!";
//$serial = "Still need to figger serial out!";
//$features = "Still need to figger features out!";

?>
10 changes: 10 additions & 0 deletions includes/static-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,16 @@
$config['os'][$os]['text'] = "Symbol AP";
$config['os'][$os]['icon'] = "symbol";

$os = "firebox";
$config['os'][$os]['text'] = "Watchguard Firebox";
$config['os'][$os]['type'] = "firewall";
$config['os'][$os]['over'][0]['graph'] = "device_bits";
$config['os'][$os]['over'][0]['text'] = "Traffic";
$config['os'][$os]['over'][1]['graph'] = "device_processor";
$config['os'][$os]['over'][1]['text'] = "CPU Usage";
$config['os'][$os]['icon'] = "watchguard";


foreach ($config['os'] as $this_os => $blah)
{
if (isset($config['os'][$this_os]['group']))
Expand Down
Loading

0 comments on commit 2421e50

Please sign in to comment.