mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added Active GlobalProtect Tunnels graph to PANOS (#4654)
feature: Added GlobalProtect sessions to PANOS
This commit is contained in:
16
html/includes/graphs/device/panos_activetunnels.inc.php
Normal file
16
html/includes/graphs/device/panos_activetunnels.inc.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], 'panos-activetunnels');
|
||||
|
||||
$ds = 'activetunnels';
|
||||
|
||||
$colour_area = '9999cc';
|
||||
$colour_line = '0000cc';
|
||||
|
||||
$colour_area_max = '9999cc';
|
||||
|
||||
$graph_max = 1;
|
||||
|
||||
$unit_text = 'Active Tunnels';
|
||||
|
||||
require 'includes/graphs/generic_simplex.inc.php';
|
@@ -2454,9 +2454,14 @@ $config['graph_types']['device']['fortigate_cpu']['descr'] = 'CPU';
|
||||
$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';
|
||||
|
||||
//PAN OS Graphs
|
||||
$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']['panos_activetunnels']['section'] = 'firewall';
|
||||
$config['graph_types']['device']['panos_activetunnels']['order'] = '1';
|
||||
$config['graph_types']['device']['panos_activetunnels']['descr'] = 'Active GlobalProtect Tunnels';
|
||||
|
||||
//Pulse Secure Graphs
|
||||
$config['graph_types']['device']['pulse_users']['section'] = 'firewall';
|
||||
|
@@ -19,3 +19,18 @@ if (is_numeric($sessions)) {
|
||||
|
||||
$graphs['panos_sessions'] = true;
|
||||
}
|
||||
|
||||
$activetunnels = snmp_get($device, '1.3.6.1.4.1.25461.2.1.2.5.1.3.0', '-Ovq');
|
||||
|
||||
if (is_numeric($activetunnels)) {
|
||||
$rrd_def = 'DS:activetunnels:GAUGE:600:0:3000000';
|
||||
|
||||
$fields = array(
|
||||
'activetunnels' => $activetunnels,
|
||||
);
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'panos-activetunnels', $tags, $fields);
|
||||
|
||||
$graphs['panos_activetunnels'] = true;
|
||||
}
|
||||
|
1
sql-schema/141.sql
Normal file
1
sql-schema/141.sql
Normal file
@@ -0,0 +1 @@
|
||||
INSERT INTO `graph_types`(`graph_type`, `graph_subtype`, `graph_section`, `graph_descr`, `graph_order`) VALUES ('device', 'panos_activetunnels', 'firewall', 'Active GlobalProtect Tunnels', '');
|
Reference in New Issue
Block a user