Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -1,5 +1,4 @@
<?php
/**
* Observium
*
@ -7,31 +6,31 @@
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @copyright (C) Adam Armstrong
*
*/
if (is_numeric($vars['id']))
{
$tunnel = dbFetchRow("SELECT * FROM `ipsec_tunnels`WHERE `tunnel_id` = ?", array($vars['id']));
if (!is_intnum($vars['id'])) {
return;
}
if (is_numeric($tunnel['device_id']) && ($auth || device_permitted($tunnel['device_id'])))
{
$tunnel = dbFetchRow("SELECT * FROM `ipsec_tunnels` WHERE `tunnel_id` = ?", [$vars['id']]);
if (is_numeric($tunnel['device_id']) && ($auth || device_permitted($tunnel['device_id']))) {
$device = device_by_id_cache($tunnel['device_id']);
if ($tunnel['tunnel_endhash'])
{
// New index
$rrd_index = $tunnel['local_addr'] . '-' . $tunnel['peer_addr'] . '-' . $tunnel['tunnel_endhash'];
if ($tunnel['tunnel_endhash']) {
// New index
$rrd_index = $tunnel['local_addr'] . '-' . $tunnel['peer_addr'] . '-' . $tunnel['tunnel_endhash'];
} else {
$rrd_index = $tunnel['peer_addr'];
$rrd_index = $tunnel['peer_addr'];
}
$rrd_filename = get_rrd_path($device, "ipsectunnel-".$rrd_index.".rrd");
$rrd_filename = get_rrd_path($device, "ipsectunnel-" . $rrd_index . ".rrd");
$title = generate_device_link($device);
$title .= " :: IPSEC Tunnel :: " . escape_html($tunnel['peer_addr']);
$auth = TRUE;
}
$auth = TRUE;
$graph_title = device_name($device, TRUE);
$graph_title .= " :: IPSEC Tunnel :: " . $tunnel['peer_addr'];
}
// EOF

View File

@ -5,17 +5,17 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage graphs
* @copyright (C) Adam Armstrong
*
*/
$ds_in = "TunInOctets";
$ds_in = "TunInOctets";
$ds_out = "TunOutOctets";
$format = "octets";
include($config['html_dir']."/includes/graphs/generic_data.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_data.inc.php");
?>

View File

@ -5,26 +5,26 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage graphs
* @copyright (C) Adam Armstrong
*
*/
$ds_in = "TunInPkts";
$ds_in = "TunInPkts";
$ds_out = "TunOutPkts";
$colour_area_in = $config['colours']['graphs']['pkts']['in_area'];
$colour_line_in = $config['colours']['graphs']['pkts']['in_line'];
$colour_area_in = $config['colours']['graphs']['pkts']['in_area'];
$colour_line_in = $config['colours']['graphs']['pkts']['in_line'];
$colour_area_out = $config['colours']['graphs']['pkts']['out_area'];
$colour_line_out = $config['colours']['graphs']['pkts']['out_line'];
$colour_area_in_max = $config['colours']['graphs']['pkts']['in_max'];
$colour_area_in_max = $config['colours']['graphs']['pkts']['in_max'];
$colour_area_out_max = $config['colours']['graphs']['pkts']['out_max'];
$graph_max = 1;
$unit_text = "Packets";
include($config['html_dir']."/includes/graphs/generic_duplex.inc.php");
include($config['html_dir'] . "/includes/graphs/generic_duplex.inc.php");
?>