mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
change config format
git-svn-id: http://www.observium.org/svn/observer/trunk@165 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+21
-24
@@ -2,22 +2,22 @@
|
||||
|
||||
### Database config
|
||||
$config['db_host'] = "localhost";
|
||||
$config['db_user'] = "observer";
|
||||
$config['db_pass'] = "observer-pass";
|
||||
$config['db_name'] = "observer-demo";
|
||||
|
||||
$config['db_user'] = "observer_demo";
|
||||
$config['db_pass'] = "observer_pass";
|
||||
$config['db_name'] = "observer_demo";
|
||||
|
||||
### Installation Location
|
||||
$installdir = "/var/sites/observer/";
|
||||
$installdir = "/home/adama/sites/demo.project-observer.org/";
|
||||
$htmldir = $installdir . "html";
|
||||
$rrd_dir = $installdir . "rrd";
|
||||
|
||||
$base_url = "http://demo.project-observer.org";
|
||||
$config['rrd_dir'] = $installdir . "rrd";
|
||||
$rrd_dir = $config['rrd_dir'];
|
||||
|
||||
### Default community
|
||||
$community = "";
|
||||
$config['community'] = "observer";
|
||||
$community = $config['community'];
|
||||
|
||||
$base_url = "http://demo.project-observer.org";
|
||||
|
||||
### File containing syslog
|
||||
$syslogfile = "";
|
||||
|
||||
@@ -42,31 +42,30 @@ $snmpget = $config['snmpget'];
|
||||
|
||||
# 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",
|
||||
"-c", "FONT#000000", "-c", "CANVAS#FFFFFF", "-c", "GRID#aaaaaa",
|
||||
"-c", "MGRID#FFAAAA", "-c", "FRAME#5e5e5e", "-c", "ARROW#5e5e5e",
|
||||
"-R", "normal");
|
||||
|
||||
#Set some default properties for overlib popups
|
||||
$config['overlib_defaults'] = ",FGCOLOR,'#e5e5e5', BGCOLOR, '#e5e5e5'";
|
||||
|
||||
|
||||
### 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
|
||||
$config['mydomain'] = "project-observer.org";
|
||||
### Your company domain name and specifics
|
||||
$config['mydomain'] = "vostron.net";
|
||||
$config['page_title'] = "Observer Demo";
|
||||
$config['title_image'] = "/images/observer-header.png";
|
||||
$config['stylesheet'] = "/css/styles.css";
|
||||
$config['title_image'] = "images/observer-header.png";
|
||||
$config['stylesheet'] = "css/styles.css";
|
||||
$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_from'] = "observer@project-observer.org";
|
||||
$config['email_default'] = "adama@memetic.org";
|
||||
$config['email_from'] = "Observer demo <observer-demo@project-observer.org>";
|
||||
$config['email_headers'] = "From: " . $config['email_from'] . "\r\n";
|
||||
|
||||
|
||||
### Which interface sections should we show?
|
||||
$show_if_customers = 1;
|
||||
$show_if_transit = 0;
|
||||
@@ -74,22 +73,20 @@ $show_if_peering = 0;
|
||||
$show_if_core = 0;
|
||||
$show_if_l2tp =0;
|
||||
$show_locations = 1;
|
||||
$show_if_bills = 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",
|
||||
"-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm",
|
||||
"async", "plip", "-physical", "-signalling", "control plane",
|
||||
"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");
|
||||
|
||||
### List of OS strings to match during discovery
|
||||
### Valis OSes
|
||||
$valid_os = array("IOS", "Linux", "OpenBSD", "FreeBSD", "NetBSD", "ProCurve", "m0n0wall", "pfSense", "Snom", "Voswall", "DragonFly");
|
||||
|
||||
### entPhysicalVendorType rewrites
|
||||
|
||||
@@ -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 .= ".1.3.6.1.2.1.15.2";
|
||||
$bgpLocalAs = trim(`$as_cmd`);
|
||||
$bgpLocalAs = trim(shell_exec($as_cmd));
|
||||
|
||||
if($bgpLocalAs) {
|
||||
|
||||
@@ -29,7 +29,7 @@ while ($device = mysql_fetch_array($device_query)) {
|
||||
if($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 ");
|
||||
|
||||
@@ -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 .= "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_data = trim(`$peer_cmd`);
|
||||
$peer_data = trim(shell_exec($peer_cmd));
|
||||
|
||||
$peerrrd = $rrd_dir . "/" . $device['hostname'] . "/bgp-$peer_ip.rrd";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user