initial commit; version 22.5.12042

This commit is contained in:
2022-12-12 23:28:25 -05:00
commit af1b03d79f
17653 changed files with 22692970 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
if (is_numeric($vars['id']))
{
$data = dbFetchRow("SELECT * FROM `bgpPeers` WHERE `bgpPeer_id` = ?", array($vars['id']));
if (is_numeric($data['device_id']) && ($auth || device_permitted($data['device_id'])))
{
$device = device_by_id_cache($data['device_id']);
$graph_title = $device['hostname'];
$graph_title .= " :: AS" . ($config['web_show_bgp_asdot'] ? bgp_asplain_to_asdot($data['bgpPeerRemoteAs']) : $data['bgpPeerRemoteAs']);
$auth = TRUE;
}
}
// EOF

View File

@ -0,0 +1,28 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
if (preg_match('/^(?<subtype>prefixes)_(?<afi>ipv[46])(?<safi>\w+)/', $subtype, $matches))
{
// prefixes_ipv4unicast -> $data['bgpPeerRemoteAddr'] . ".ipv4.unicast
$subtype = $matches['subtype'];
$index = $data['bgpPeerRemoteAddr'] . '.' . $matches['afi'] . '.' . $matches['safi'];
$graph_title .= " :: Prefixes " . escape_html($data['bgpPeerRemoteAddr'] . ' - ' . $matches['afi'] . '.' . $matches['safi']);
} else {
$subtype = 'updates';
$graph_title .= " :: Updates " . escape_html($data['bgpPeerRemoteAddr']);
}
include($config['html_dir'] . "/includes/graphs/generic_definition.inc.php");
// EOF

View File

@ -0,0 +1,35 @@
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage graphs
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
*
*/
$scale_min = "0";
$rrd_filename = get_rrd_path($device, "bgp-" . $data['bgpPeerRemoteAddr'] . ".rrd");
$ds_in = "bgpPeerInUpdates";
$ds_out = "bgpPeerOutUpdates";
$colour_area_in = "AA66AA90";
$colour_line_in = darken_color($colour_area_in, 1);
$colour_area_out = "FF660090";
$colour_line_out = darken_color($colour_area_out, 1);
$colour_area_in_max = "FFEE99";
$colour_area_out_max = "FF7711";
$graph_max = 1;
$unit_text = "Updates";
include($config['html_dir']."/includes/graphs/generic_duplex.inc.php");
// EOF