mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added session graphs for Barracuda NGFW (#10102)
* devices: Corrected discovery object ID for Barracuda NGFW; Added fw session graphs * device: Added test data
This commit is contained in:
@@ -79,6 +79,12 @@ $config['graph_types']['device']['siklu_rfinterfaceOtherOctets']['section'] = 'w
|
||||
$config['graph_types']['device']['siklu_rfinterfaceOtherOctets']['order'] = '6';
|
||||
$config['graph_types']['device']['siklu_rfinterfaceOtherOctets']['descr'] = 'Other Octets';
|
||||
|
||||
// Barracuda Firewall support
|
||||
$config['graph_types']['device']['barracuda_firewall_sessions']['section'] = 'firewall';
|
||||
$config['graph_types']['device']['barracuda_firewall_sessions']['order'] = 0;
|
||||
$config['graph_types']['device']['barracuda_firewall_sessions']['descr'] = 'Active Sessions';
|
||||
|
||||
|
||||
// Ceragon Ceraos support
|
||||
$config['graph_types']['device']['ceraos_RxLevel']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['ceraos_RxLevel']['order'] = '0';
|
||||
|
@@ -3,8 +3,14 @@ text: 'Barracuda NG Firewall'
|
||||
type: firewall
|
||||
icon: barracuda
|
||||
over:
|
||||
- { graph: device_bits, text: Traffic }
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'CPU Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
discovery:
|
||||
- sysObjectID:
|
||||
- .1.3.6.1.4.1.10704.1
|
||||
- sysDescr:
|
||||
- Barracuda Firewall
|
||||
- Barracuda NG Firewall
|
||||
mib_dir:
|
||||
- barracuda
|
||||
|
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], 'barracuda_firewall_sessions');
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$ds = 'fw_sessions';
|
||||
|
||||
$colour_area = '9999cc';
|
||||
$colour_line = '0000cc';
|
||||
|
||||
$colour_area_max = '9999cc';
|
||||
|
||||
#$graph_max = 1;
|
||||
$graph_min = 0;
|
||||
|
||||
$unit_text = 'Sessions';
|
||||
|
||||
require 'includes/html/graphs/generic_simplex.inc.php';
|
@@ -10,6 +10,22 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
if ($device['sysObjectID'] == '.1.3.6.1.4.1.10704.1.10') {
|
||||
$hardware = $device['sysName'];
|
||||
}
|
||||
|
||||
$sessions = snmp_get($device, 'firewallSessions64.8.102.119.83.116.97.116.115.0', '-OQv', 'PHION-MIB');
|
||||
|
||||
if (is_numeric($sessions)) {
|
||||
$rrd_def = RrdDefinition::make()->addDataset('fw_sessions', 'GAUGE', 0);
|
||||
|
||||
$fields = array(
|
||||
'fw_sessions' => $sessions
|
||||
);
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'barracuda_firewall_sessions', $tags, $fields);
|
||||
$graphs['barracuda_firewall_sessions'] = true;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
4157
tests/data/barracudangfirewall.json
Normal file
4157
tests/data/barracudangfirewall.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user