change config format

git-svn-id: http://www.observium.org/svn/observer/trunk@165 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-03-16 15:17:40 +00:00
parent ab7848e62d
commit 79fa1d6c73
2 changed files with 25 additions and 28 deletions
+22 -25
View File
@@ -2,22 +2,22 @@
### Database config ### Database config
$config['db_host'] = "localhost"; $config['db_host'] = "localhost";
$config['db_user'] = "observer"; $config['db_user'] = "observer_demo";
$config['db_pass'] = "observer-pass"; $config['db_pass'] = "observer_pass";
$config['db_name'] = "observer-demo"; $config['db_name'] = "observer_demo";
### Installation Location ### Installation Location
$installdir = "/var/sites/observer/"; $installdir = "/home/adama/sites/demo.project-observer.org/";
$htmldir = $installdir . "html"; $htmldir = $installdir . "html";
$rrd_dir = $installdir . "rrd"; $config['rrd_dir'] = $installdir . "rrd";
$rrd_dir = $config['rrd_dir'];
$base_url = "http://demo.project-observer.org";
### Default community ### Default community
$community = ""; $config['community'] = "observer";
$community = $config['community']; $community = $config['community'];
$base_url = "http://demo.project-observer.org";
### File containing syslog ### File containing syslog
$syslogfile = ""; $syslogfile = "";
@@ -42,54 +42,51 @@ $snmpget = $config['snmpget'];
# Set the general colours and other settings for rrdtool graphs # Set the general colours and other settings for rrdtool graphs
# Set some default colors for all RRD graphs
$config['rrdgraph_defaults'] = array("-c", "BACK#FFFFFF", "-c", "SHADEA#E5E5E5", "-c", "SHADEB#E5E5E5", $config['rrdgraph_defaults'] = array("-c", "BACK#FFFFFF", "-c", "SHADEA#E5E5E5", "-c", "SHADEB#E5E5E5",
"-c", "FONT#000000", "-c", "CANVAS#FFFFFF", "-c", "GRID#aaaaaa", "-c", "FONT#000000", "-c", "CANVAS#FFFFFF", "-c", "GRID#aaaaaa",
"-c", "MGRID#FFAAAA", "-c", "FRAME#5e5e5e", "-c", "ARROW#5e5e5e", "-c", "MGRID#FFAAAA", "-c", "FRAME#5e5e5e", "-c", "ARROW#5e5e5e",
"-R", "normal"); "-R", "normal");
#Set some default properties for overlib popups
$config['overlib_defaults'] = ",FGCOLOR,'#e5e5e5', BGCOLOR, '#e5e5e5'"; $config['overlib_defaults'] = ",FGCOLOR,'#e5e5e5', BGCOLOR, '#e5e5e5'";
### List of networks to allow scanning-based discovery ### List of networks to allow scanning-based discovery
$config['nets'] = array ("192.168.0.0/24", "10.0.0.0/8"); $config['nets'] = array ("89.21.224.0/19", "10.0.0.0/8", "172.22.0.0/16", "213.253.1.0/24");
### Your company domain name ### Your company domain name and specifics
$config['mydomain'] = "project-observer.org"; $config['mydomain'] = "vostron.net";
$config['page_title'] = "Observer Demo"; $config['page_title'] = "Observer Demo";
$config['title_image'] = "/images/observer-header.png"; $config['title_image'] = "images/observer-header.png";
$config['stylesheet'] = "/css/styles.css"; $config['stylesheet'] = "css/styles.css";
$mono_font = "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf"; $mono_font = "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf";
$config['favicon'] = "/favicon.ico"; $config['favicon'] = "favicon.ico";
$config['email_default'] = "admin@project-observer.org"; $config['email_default'] = "adama@memetic.org";
$config['email_from'] = "observer@project-observer.org"; $config['email_from'] = "Observer demo <observer-demo@project-observer.org>";
$config['email_headers'] = "From: " . $config['email_from'] . "\r\n"; $config['email_headers'] = "From: " . $config['email_from'] . "\r\n";
### Which interface sections should we show? ### Which interface sections should we show?
$show_if_customers = 1; $show_if_customers = 1;
$show_if_transit = 0; $show_if_transit = 0;
$show_if_peering = 0; $show_if_peering = 0;
$show_if_core = 0; $show_if_core = 0;
$show_if_l2tp = 0; $show_if_l2tp =0;
$show_locations = 1; $show_locations = 1;
$show_if_bills = 1;
$enable_syslog = 1; $enable_syslog = 1;
### Interface name strings to ignore during discovery ### Interface name strings to ignore
$bif = array("null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "lp0", "faith0", $bif = array("null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "lp0", "faith0",
"-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm", "-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm",
"async", "plip", "-physical", "-signalling", "control plane", "async", "plip", "-physical", "-signalling", "control plane",
"bri", "-bearer", "ng", "bluetooth", "isatap", "ras", "qos", "miniport"); "bri", "-bearer", "ng", "bluetooth", "isatap", "ras", "qos", "miniport");
### Mountpoints to ignore during discovery ### Mountpoints to ignore
$ignore_mount = array("/kern", "/mnt/cdrom", "/dev", "/dev/pts"); $ignore_mount = array("/kern", "/mnt/cdrom", "/dev", "/dev/pts");
### List of OS strings to match during discovery ### Valis OSes
$valid_os = array("IOS", "Linux", "OpenBSD", "FreeBSD", "NetBSD", "ProCurve", "m0n0wall", "pfSense", "Snom", "Voswall", "DragonFly"); $valid_os = array("IOS", "Linux", "OpenBSD", "FreeBSD", "NetBSD", "ProCurve", "m0n0wall", "pfSense", "Snom", "Voswall", "DragonFly");
### entPhysicalVendorType rewrites ### entPhysicalVendorType rewrites
+3 -3
View File
@@ -13,7 +13,7 @@ while ($device = mysql_fetch_array($device_query)) {
$as_cmd = $config['snmpwalk'] . " -CI -Oqvn -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'] . " "; $as_cmd = $config['snmpwalk'] . " -CI -Oqvn -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'] . " ";
$as_cmd .= ".1.3.6.1.2.1.15.2"; $as_cmd .= ".1.3.6.1.2.1.15.2";
$bgpLocalAs = trim(`$as_cmd`); $bgpLocalAs = trim(shell_exec($as_cmd));
if($bgpLocalAs) { if($bgpLocalAs) {
@@ -29,7 +29,7 @@ while ($device = mysql_fetch_array($device_query)) {
if($peer) { if($peer) {
list($peer_ip, $peer_as) = split(" ", $peer); list($peer_ip, $peer_as) = split(" ", $peer);
$astext = trim(`/usr/bin/dig +short AS$peer_as.asn.cymru.com TXT | sed s/\"//g | cut -d "|" -f 5`); $astext = trim(str_replace("\"", "", shell_exec("/usr/bin/dig +short AS$peer_as.asn.cymru.com TXT | cut -d '|' -f 5")));
echo(str_pad($peer_ip, 32). str_pad($astext, 32) . " $peer_as "); echo(str_pad($peer_ip, 32). str_pad($astext, 32) . " $peer_as ");
@@ -43,7 +43,7 @@ while ($device = mysql_fetch_array($device_query)) {
$peer_cmd = $config['snmpget'] . " -Ovq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'] . " "; $peer_cmd = $config['snmpget'] . " -Ovq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'] . " ";
$peer_cmd .= "bgpPeerState.$peer_ip bgpPeerAdminStatus.$peer_ip bgpPeerInUpdates.$peer_ip bgpPeerOutUpdates.$peer_ip bgpPeerInTotalMessages.$peer_ip "; $peer_cmd .= "bgpPeerState.$peer_ip bgpPeerAdminStatus.$peer_ip bgpPeerInUpdates.$peer_ip bgpPeerOutUpdates.$peer_ip bgpPeerInTotalMessages.$peer_ip ";
$peer_cmd .= "bgpPeerOutTotalMessages.$peer_ip bgpPeerFsmEstablishedTime.$peer_ip bgpPeerInUpdateElapsedTime.$peer_ip"; $peer_cmd .= "bgpPeerOutTotalMessages.$peer_ip bgpPeerFsmEstablishedTime.$peer_ip bgpPeerInUpdateElapsedTime.$peer_ip";
$peer_data = trim(`$peer_cmd`); $peer_data = trim(shell_exec($peer_cmd));
$peerrrd = $rrd_dir . "/" . $device['hostname'] . "/bgp-$peer_ip.rrd"; $peerrrd = $rrd_dir . "/" . $device['hostname'] . "/bgp-$peer_ip.rrd";