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:
pobradovic08
2019-04-27 15:33:55 +02:00
committed by PipoCanaja
parent ae1b5bbfc1
commit b8c4f38fb5
7 changed files with 6697 additions and 855 deletions

View File

@@ -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';

View File

@@ -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

View File

@@ -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';

View File

@@ -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;
}

View File

@@ -9,7 +9,7 @@ PHION-MIB DEFINITIONS ::= BEGIN
ORGANIZATION
"Barracuda Networks"
CONTACT-INFO
"http://www.barracuda.com[1]"
"http://www.barracuda.com"
DESCRIPTION
"."
@@ -67,6 +67,8 @@ PHION-MIB DEFINITIONS ::= BEGIN
DESCRIPTION " "
GROUP trafficshapeGroup
DESCRIPTION " "
GROUP diskspaceGroup
DESCRIPTION " "
GROUP eventGroup
DESCRIPTION " "
GROUP notificationGroup
@@ -648,7 +650,10 @@ PHION-MIB DEFINITIONS ::= BEGIN
FwStatsEntry ::= SEQUENCE {
firewallSessions Integer32,
packetThroughput Integer32,
dataThroughput Integer32
dataThroughput Integer32,
firewallSessions64 Counter64,
packetThroughput64 Counter64,
dataThroughput64 Counter64
}
firewallSessions OBJECT-TYPE
@@ -675,11 +680,38 @@ PHION-MIB DEFINITIONS ::= BEGIN
" "
::= { fwStatsEntry 3 }
firewallSessions64 OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" "
::= { fwStatsEntry 4 }
packetThroughput64 OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" "
::= { fwStatsEntry 5 }
dataThroughput64 OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" "
::= { fwStatsEntry 6 }
fwstatsGroup OBJECT-GROUP
OBJECTS {
firewallSessions,
packetThroughput,
dataThroughput
dataThroughput,
firewallSessions64,
packetThroughput64,
dataThroughput64
}
STATUS current
DESCRIPTION " "
@@ -880,6 +912,84 @@ PHION-MIB DEFINITIONS ::= BEGIN
DESCRIPTION " "
::= { hwGroups 4 }
-- diskSpace
diskSpace OBJECT-TYPE
SYNTAX SEQUENCE OF DiskSpaceEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
" "
::= { firewall 13 }
diskSpaceEntry OBJECT-TYPE
SYNTAX DiskSpaceEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
" "
INDEX { partitionName }
::= { diskSpace 1 }
DiskSpaceEntry ::= SEQUENCE {
partitionName DisplayString,
partitionMaxSpace Counter64,
partitionFreeSpace Counter64,
partitionUsedSpace Counter64,
partitionUsedSpacePercent Integer32
}
partitionName OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..63))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Name of the partition entry"
::= { diskSpaceEntry 1 }
partitionMaxSpace OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Maximum space of partition entry in KB"
::= { diskSpaceEntry 2 }
partitionFreeSpace OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Free space of partition entry in KB"
::= { diskSpaceEntry 3 }
partitionUsedSpace OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Used space of partition entry in KB"
::= { diskSpaceEntry 4 }
partitionUsedSpacePercent OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Used space of partition entry in %"
::= { diskSpaceEntry 5 }
diskspaceGroup OBJECT-GROUP
OBJECTS {
partitionName,
partitionMaxSpace,
partitionFreeSpace,
partitionUsedSpace,
partitionUsedSpacePercent
}
STATUS current
DESCRIPTION " "
::= { hwGroups 5 }
-- Vars
eventID OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..5))
@@ -969,3 +1079,4 @@ PHION-MIB DEFINITIONS ::= BEGIN
DESCRIPTION " "
::= { eventGroups 2 }
END

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff