mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
1b1859051f
* Add additional OpenBSD PF graphs
Some of these were already present for PFSense (matches, badoffset,
fragmented, short, normalized, memdropped) and reuse existing graph
types; the others are are added as new types.
* collect-snmp-data.php: support IPv6 hosts
* Add SNMP data for new OpenBSD OIDs
* Stack all OpenBSD PF drops into a single graph/rrdfile
* Pull additional drops in to pf_drops
The MIB descriptions don't say "drop", but reading the OpenBSD source:
https://github.com/openbsd/src/blob/c471a73b6524ed1e52e6e48ecbdea0a4a57c470a/sys/net/pfvar.h#L1196
it's clear that badoff, frag, short, and norm are all drop reasons.
Pull them in into the stacked drop graph, too.
* ./scripts/save-test-data.php -o openbsd -v pf
* Include device_graphs in saved os module test data
* Revert "Include device_graphs in saved os module test data"
This reverts commit a85c902fe9.
* Update to use SnmpQuery
Co-authored-by: Kevin Wallace <kevinwallace@users.noreply.github.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
40 lines
945 B
PHP
40 lines
945 B
PHP
<?php
|
|
|
|
$rrd_filename = Rrd::name($device['hostname'], 'pf_drops');
|
|
|
|
$i = 0;
|
|
|
|
foreach ([
|
|
'badoffset' => 'BadOffset',
|
|
'fragmented' => 'Fragmented',
|
|
'short' => 'Short',
|
|
'normalized' => 'Normalized',
|
|
'memory' => 'Memory',
|
|
'timestamp' => 'Timestamp',
|
|
'congestion' => 'Congestion',
|
|
'ipoption' => 'IpOption',
|
|
'protocksum' => 'ProtoCksum',
|
|
'statemismatch' => 'StateMismatch',
|
|
'stateinsert' => 'StateInsert',
|
|
'statelimit' => 'StateLimit',
|
|
'srclimit' => 'SrcLimit',
|
|
'synproxy' => 'Synproxy',
|
|
'translate' => 'Translate',
|
|
'noroute' => 'NoRoute',
|
|
] as $ds => $descr) {
|
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
|
$rrd_list[$i]['descr'] = $descr;
|
|
$rrd_list[$i]['ds'] = $ds;
|
|
$i++;
|
|
}
|
|
|
|
$unit_text = 'Dropped Packets';
|
|
|
|
$units = 'Packets';
|
|
$total_units = 'Packets';
|
|
$colours = 'psychedelic';
|
|
|
|
$scale_min = '0';
|
|
|
|
require 'includes/html/graphs/generic_multi_simplex_seperated.inc.php';
|