mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixing things!
git-svn-id: http://www.observium.org/svn/observer/trunk@182 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -7,19 +7,16 @@ $config['db_pass'] = "observer_pass";
|
||||
$config['db_name'] = "observer_demo";
|
||||
|
||||
### Installation Location
|
||||
$installdir = "/home/adama/sites/demo.project-observer.org/";
|
||||
$htmldir = $installdir . "html";
|
||||
$config['rrd_dir'] = $installdir . "rrd";
|
||||
$config['installdir'] = "/home/adama/sites/demo.project-observer.org/";
|
||||
$config['htmldir'] = $config['installdir'] . "html";
|
||||
$config['rrd_dir'] = $config['installdir'] . "rrd";
|
||||
$rrd_dir = $config['rrd_dir'];
|
||||
|
||||
### Default community
|
||||
$config['community'] = "observer";
|
||||
$community = $config['community'];
|
||||
|
||||
$base_url = "http://demo.project-observer.org";
|
||||
|
||||
### File containing syslog
|
||||
$syslogfile = "";
|
||||
$config['base_url'] = "http://demo.project-observer.org";
|
||||
|
||||
### Location of executables
|
||||
|
||||
@@ -58,7 +55,8 @@ $config['mydomain'] = "vostron.net";
|
||||
$config['page_title'] = "Observer Demo";
|
||||
$config['title_image'] = "images/observer-header.png";
|
||||
$config['stylesheet'] = "css/styles.css";
|
||||
$mono_font = "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf";
|
||||
$config['mono_font'] = "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf";
|
||||
$mono_font = $config['mono_font'];
|
||||
$config['favicon'] = "favicon.ico";
|
||||
|
||||
$config['email_default'] = "adama@memetic.org";
|
||||
@@ -82,16 +80,9 @@ $config['bif'] = array("null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "l
|
||||
"async", "plip", "-physical", "-signalling", "control plane",
|
||||
"bri", "-bearer", "ng", "bluetooth", "isatap", "ras", "qos", "miniport");
|
||||
|
||||
$bif = $config['bif']
|
||||
|
||||
### Mountpoints to ignore
|
||||
|
||||
$config['ignore_mount'] = array("/kern", "/mnt/cdrom", "/dev", "/dev/pts");
|
||||
$ignore_mount = $config['ignore_mount']
|
||||
|
||||
|
||||
### Valis OSes
|
||||
$valid_os = array("IOS", "Linux", "OpenBSD", "FreeBSD", "NetBSD", "ProCurve", "m0n0wall", "pfSense", "Snom", "Voswall", "DragonFly");
|
||||
|
||||
### entPhysicalVendorType rewrites
|
||||
|
||||
@@ -115,7 +106,6 @@ $entPhysicalVendorTypes = array (
|
||||
'cevMGBIC1000BaseLX' => '1000BaseLX GBIC',
|
||||
'cevPort10GigBaseLR' => '10GigBaseLR');
|
||||
|
||||
|
||||
### Style Options
|
||||
|
||||
$list_colour_a = "#ffffff";
|
||||
@@ -128,7 +118,7 @@ $warn_colour_b = "#ffcccc";
|
||||
# No changes below this line #
|
||||
##############################
|
||||
|
||||
$observer_version = "0.3.1";
|
||||
$config['version'] = "0.3.1";
|
||||
|
||||
### Connect to database
|
||||
if (!@mysql_connect($config['db_host'], $config['db_user'], $config['db_pass'])) {
|
||||
|
@@ -549,15 +549,7 @@ function fixIOSHardware($hardware){
|
||||
function createHost ($host, $community, $snmpver){
|
||||
$host = trim(strtolower($host));
|
||||
$host_os = getHostOS($host, $community, $snmpver);
|
||||
global $valid_os;
|
||||
#$nullhost = 1;
|
||||
#echo("$host -> $host_os<br />");
|
||||
#foreach($valid_os as $os) {
|
||||
# if ($os == $host_os) {
|
||||
$nullhost = '0';
|
||||
# }
|
||||
#}
|
||||
if($nullhost == '0' && $host_os) {
|
||||
if($host_os) {
|
||||
$sql = mysql_query("INSERT INTO `devices` (`hostname`, `community`, `os`, `status`) VALUES ('$host', '$community', '$host_os', '1')");
|
||||
return("Created host : $host ($host_os)");
|
||||
} else {
|
||||
|
@@ -21,7 +21,7 @@ function graph_netscreen_sessions ($rrd, $graph, $from, $to, $width, $height, $t
|
||||
}
|
||||
|
||||
function graph_netscreen_cpu ($rrd, $graph, $from, $to, $width, $height, $title, $vertical) {
|
||||
global $config, $rrdtool, $installdir, $mono_font, $rrd_dir;
|
||||
global $config;
|
||||
$database = $config['rrd_dir'] . "/" . $rrd;
|
||||
$imgfile = "graphs/" . "$graph";
|
||||
$period = $to - $from;
|
||||
|
Reference in New Issue
Block a user