2007-04-03 14:10:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
### Database config
|
2007-11-30 14:48:14 +00:00
|
|
|
$config['db_host'] = "localhost";
|
2008-03-16 15:17:40 +00:00
|
|
|
$config['db_user'] = "observer_demo";
|
|
|
|
$config['db_pass'] = "observer_pass";
|
|
|
|
$config['db_name'] = "observer_demo";
|
2007-11-30 14:48:14 +00:00
|
|
|
|
|
|
|
### Installation Location
|
2008-03-16 15:17:40 +00:00
|
|
|
$installdir = "/home/adama/sites/demo.project-observer.org/";
|
2007-11-30 14:48:14 +00:00
|
|
|
$htmldir = $installdir . "html";
|
2008-03-16 15:17:40 +00:00
|
|
|
$config['rrd_dir'] = $installdir . "rrd";
|
|
|
|
$rrd_dir = $config['rrd_dir'];
|
2008-03-12 09:22:11 +00:00
|
|
|
|
2007-04-03 14:10:23 +00:00
|
|
|
### Default community
|
2008-03-16 15:17:40 +00:00
|
|
|
$config['community'] = "observer";
|
2007-11-30 14:48:14 +00:00
|
|
|
$community = $config['community'];
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2008-03-16 15:17:40 +00:00
|
|
|
$base_url = "http://demo.project-observer.org";
|
|
|
|
|
2007-04-03 14:10:23 +00:00
|
|
|
### File containing syslog
|
|
|
|
$syslogfile = "";
|
|
|
|
|
|
|
|
### Location of executables
|
|
|
|
|
2007-11-30 14:48:14 +00:00
|
|
|
$config['rrdtool'] = "/usr/bin/rrdtool";
|
|
|
|
$rrdtool = $config['rrdtool'];
|
|
|
|
|
|
|
|
$config['fping'] = "/usr/sbin/fping";
|
|
|
|
$fping = $config['fping'];
|
|
|
|
|
|
|
|
$config['ipcalc'] = "/usr/bin/ipcalc";
|
|
|
|
$ipcalc = $config['ipcalc'];
|
|
|
|
|
|
|
|
$config['snmpwalk'] = "/usr/bin/snmpwalk";
|
|
|
|
$snmpwalk = $config['snmpwalk'];
|
|
|
|
|
|
|
|
$config['snmpget'] = "/usr/bin/snmpget";
|
|
|
|
$snmpget = $config['snmpget'];
|
|
|
|
|
|
|
|
### RRDGraph Settings
|
|
|
|
|
|
|
|
# Set the general colours and other settings for rrdtool graphs
|
|
|
|
|
|
|
|
$config['rrdgraph_defaults'] = array("-c", "BACK#FFFFFF", "-c", "SHADEA#E5E5E5", "-c", "SHADEB#E5E5E5",
|
|
|
|
"-c", "FONT#000000", "-c", "CANVAS#FFFFFF", "-c", "GRID#aaaaaa",
|
|
|
|
"-c", "MGRID#FFAAAA", "-c", "FRAME#5e5e5e", "-c", "ARROW#5e5e5e",
|
|
|
|
"-R", "normal");
|
|
|
|
|
|
|
|
$config['overlib_defaults'] = ",FGCOLOR,'#e5e5e5', BGCOLOR, '#e5e5e5'";
|
|
|
|
|
2007-04-03 14:10:23 +00:00
|
|
|
|
|
|
|
### List of networks to allow scanning-based discovery
|
2008-03-16 15:17:40 +00:00
|
|
|
$config['nets'] = array ("89.21.224.0/19", "10.0.0.0/8", "172.22.0.0/16", "213.253.1.0/24");
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2008-03-16 15:17:40 +00:00
|
|
|
### Your company domain name and specifics
|
|
|
|
$config['mydomain'] = "vostron.net";
|
2008-03-15 17:58:15 +00:00
|
|
|
$config['page_title'] = "Observer Demo";
|
2008-03-16 15:17:40 +00:00
|
|
|
$config['title_image'] = "images/observer-header.png";
|
|
|
|
$config['stylesheet'] = "css/styles.css";
|
2007-04-04 08:33:57 +00:00
|
|
|
$mono_font = "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf";
|
2008-03-16 15:17:40 +00:00
|
|
|
$config['favicon'] = "favicon.ico";
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2008-03-16 15:17:40 +00:00
|
|
|
$config['email_default'] = "adama@memetic.org";
|
|
|
|
$config['email_from'] = "Observer demo <observer-demo@project-observer.org>";
|
2008-03-12 09:26:55 +00:00
|
|
|
$config['email_headers'] = "From: " . $config['email_from'] . "\r\n";
|
|
|
|
|
2008-03-16 15:17:40 +00:00
|
|
|
|
2007-11-30 14:48:14 +00:00
|
|
|
### Which interface sections should we show?
|
2008-03-18 13:35:17 +00:00
|
|
|
$config['show_if_customers'] = 1;
|
|
|
|
$config['show_if_transit'] = 0;
|
|
|
|
$config['show_if_peering'] = 0;
|
|
|
|
$config['show_if_core'] = 0;
|
|
|
|
$config['show_if_l2tp'] = 0;
|
|
|
|
$config['show_locations'] = 1;
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2008-03-18 13:35:17 +00:00
|
|
|
$config['enable_syslog'] = 1;
|
2007-06-24 14:56:47 +00:00
|
|
|
|
2008-03-16 15:17:40 +00:00
|
|
|
### Interface name strings to ignore
|
2008-03-18 13:35:17 +00:00
|
|
|
$config['bif'] = array("null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "lp0", "faith0",
|
2007-11-30 14:48:14 +00:00
|
|
|
"-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm",
|
2007-04-03 14:10:23 +00:00
|
|
|
"async", "plip", "-physical", "-signalling", "control plane",
|
|
|
|
"bri", "-bearer", "ng", "bluetooth", "isatap", "ras", "qos", "miniport");
|
|
|
|
|
2008-03-18 13:35:17 +00:00
|
|
|
$bif = $config['bif']
|
|
|
|
|
2008-03-16 15:17:40 +00:00
|
|
|
### Mountpoints to ignore
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2008-03-18 13:35:17 +00:00
|
|
|
$config['ignore_mount'] = array("/kern", "/mnt/cdrom", "/dev", "/dev/pts");
|
|
|
|
$ignore_mount = $config['ignore_mount']
|
|
|
|
|
2007-04-03 14:10:23 +00:00
|
|
|
|
2008-03-16 15:17:40 +00:00
|
|
|
### Valis OSes
|
2007-04-03 14:10:23 +00:00
|
|
|
$valid_os = array("IOS", "Linux", "OpenBSD", "FreeBSD", "NetBSD", "ProCurve", "m0n0wall", "pfSense", "Snom", "Voswall", "DragonFly");
|
|
|
|
|
2007-11-30 14:48:14 +00:00
|
|
|
### entPhysicalVendorType rewrites
|
|
|
|
|
|
|
|
$entPhysicalVendorTypes = array (
|
|
|
|
'cevC7xxxIo1feTxIsl' => 'C7200-IO-FE-MII',
|
|
|
|
'cevChassis7140Dualfe' => 'C7140-2FE',
|
|
|
|
'cevChassis7204' => "C7204",
|
|
|
|
'cevChassis7204Vxr' => 'C7204VXR',
|
|
|
|
'cevChassis7206' => 'C7206',
|
|
|
|
'cevChassis7206Vxr' => 'C7206VXR',
|
|
|
|
'cevCpu7200Npe200' => 'NPE-200',
|
|
|
|
'cevCpu7200Npe225' => 'NPE-225',
|
|
|
|
'cevCpu7200Npe300' => 'NPE-300',
|
|
|
|
'cevCpu7200Npe400' => 'NPE-400',
|
|
|
|
'cevCpu7200Npeg1' => 'NPE-G1',
|
|
|
|
'cevCpu7200Npeg2' => 'NPE-G2',
|
|
|
|
'cevPa1feTxIsl' => 'PA-FE-TX-ISL',
|
|
|
|
'cevPa2feTxI82543' => 'PA-2FE-TX',
|
|
|
|
'cevPa8e' => 'PA-8E',
|
|
|
|
'cevPaA8tX21' => 'PA-8T-X21',
|
|
|
|
'cevMGBIC1000BaseLX' => '1000BaseLX GBIC',
|
|
|
|
'cevPort10GigBaseLR' => '10GigBaseLR');
|
|
|
|
|
|
|
|
|
2007-04-03 14:10:23 +00:00
|
|
|
### Style Options
|
|
|
|
|
|
|
|
$list_colour_a = "#ffffff";
|
|
|
|
$list_colour_b = "#eeeeee";
|
|
|
|
|
|
|
|
$warn_colour_a = "#ffeeee";
|
|
|
|
$warn_colour_b = "#ffcccc";
|
|
|
|
|
|
|
|
##############################
|
|
|
|
# No changes below this line #
|
|
|
|
##############################
|
|
|
|
|
2007-11-30 14:48:14 +00:00
|
|
|
$observer_version = "0.3.1";
|
2007-04-03 14:10:23 +00:00
|
|
|
|
|
|
|
### Connect to database
|
2007-11-30 14:48:14 +00:00
|
|
|
if (!@mysql_connect($config['db_host'], $config['db_user'], $config['db_pass'])) {
|
2007-04-03 14:10:23 +00:00
|
|
|
echo "<h2>MySQL Error</h2>";
|
|
|
|
die;
|
|
|
|
}
|
2007-11-30 14:48:14 +00:00
|
|
|
mysql_select_db($config['db_name']);
|
|
|
|
|
|
|
|
# Set some times needed by loads of scripts (it's dynamic, so we do it here!)
|
2007-04-03 14:10:23 +00:00
|
|
|
|
|
|
|
$now = time();
|
|
|
|
$day = time() - (24 * 60 * 60);
|
|
|
|
$twoday = time() - (2 * 24 * 60 * 60);
|
|
|
|
$week = time() - (7 * 24 * 60 * 60);
|
|
|
|
$month = time() - (31 * 24 * 60 * 60);
|
|
|
|
$year = time() - (365 * 24 * 60 * 60);
|
|
|
|
|
|
|
|
?>
|