mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add PanOS and ArubaOS support, patch by vendis / Christer.
git-svn-id: http://www.observium.org/svn/observer/trunk@2806 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 990 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("panos-sessions.rrd");
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$ds = "sessions";
|
||||
|
||||
$colour_area = "9999cc";
|
||||
$colour_line = "0000cc";
|
||||
|
||||
$colour_area_max = "9999cc";
|
||||
|
||||
$graph_max = 1;
|
||||
|
||||
$unit_text = "Sessions";
|
||||
|
||||
include("includes/graphs/generic_simplex.inc.php");
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
if (!$os)
|
||||
{
|
||||
if (strstr($sysDescr, "ArubaOS")) { $os = "arubaos"; }
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
if (!$os)
|
||||
{
|
||||
if (strstr($sysDescr, "Palo Alto Networks")) { $os = "panos"; }
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
// ArubaOS (MODEL: Aruba3600), Version 6.1.2.2 (29541)
|
||||
$badchars = array("(", ")", ",");
|
||||
list(,,$hardware,,$version,) = str_replace($badchars, "", explode (" ", $poll_device[sysDescr]));
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.25461.2.1.2.2.1.0", "-OQv", "", ""),'" ');
|
||||
$version = trim(snmp_get($device, "1.3.6.1.4.1.25461.2.1.2.1.1.0", "-OQv", "", ""),'" ');
|
||||
$serial = trim(snmp_get($device, "1.3.6.1.4.1.25461.2.1.2.1.3.0", "-OQv", "", ""),'" ');
|
||||
|
||||
# list(,,,$hardware) = explode (" ", $poll_device[sysDescr]);
|
||||
|
||||
$sessrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/panos-sessions.rrd";
|
||||
$sessions = snmp_get($device, "1.3.6.1.4.1.25461.2.1.2.3.3.0", "-Ovq");
|
||||
|
||||
if (is_numeric($sessions))
|
||||
{
|
||||
if (!is_file($sessrrd))
|
||||
{
|
||||
rrdtool_create($sessrrd," --step 300 DS:sessions:GAUGE:600:0:3000000 \
|
||||
RRA:AVERAGE:0.5:1:800 RRA:AVERAGE:0.5:6:800 RRA:AVERAGE:0.5:24:800 RRA:AVERAGE:0.5:288:800 \
|
||||
RRA:MAX:0.5:1:800 RRA:MAX:0.5:6:800 RRA:MAX:0.5:24:800 RRA:MAX:0.5:288:800");
|
||||
}
|
||||
rrdtool_update($sessrrd,"N:$sessions");
|
||||
$graphs['panos_sessions'] = TRUE;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -801,6 +801,15 @@ $config['os'][$os]['over'][1]['graph'] = "device_processor";
|
||||
$config['os'][$os]['over'][1]['text'] = "CPU Usage";
|
||||
$config['os'][$os]['icon'] = "watchguard";
|
||||
|
||||
$os = "panos";
|
||||
$config['os'][$os]['text'] = "PanOS";
|
||||
$config['os'][$os]['type'] = "firewall";
|
||||
$config['os'][$os]['icon'] = "panos";
|
||||
|
||||
$os = "arubaos";
|
||||
$config['os'][$os]['text'] = "ArubaOS";
|
||||
$config['os'][$os]['type'] = "wireless";
|
||||
$config['os'][$os]['icon'] = "arubaos";
|
||||
|
||||
foreach ($config['os'] as $this_os => $blah)
|
||||
{
|
||||
@@ -849,6 +858,9 @@ $config['graph_types']['device']['fortigate_sessions']['descr'] = 'Active Sessio
|
||||
$config['graph_types']['device']['screenos_sessions']['section'] = 'firewall';
|
||||
$config['graph_types']['device']['screenos_sessions']['order'] = '0';
|
||||
$config['graph_types']['device']['screenos_sessions']['descr'] = 'Active Sessions';
|
||||
$config['graph_types']['device']['panos_sessions']['section'] = 'firewall';
|
||||
$config['graph_types']['device']['panos_sessions']['order'] = '0';
|
||||
$config['graph_types']['device']['panos_sessions']['descr'] = 'Active Sessions';
|
||||
|
||||
$config['graph_types']['device']['bits']['section'] = 'netstats';
|
||||
$config['graph_types']['device']['bits']['order'] = '0';
|
||||
|
||||
Reference in New Issue
Block a user