move more settings to defaults.inc.php, vastly simplify config.php.default. move collectd functions to html/includes/, include them only where needed.

git-svn-id: http://www.observium.org/svn/observer/trunk@1390 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-17 20:30:05 +00:00
parent 3063e0e517
commit b0297704e5
12 changed files with 123 additions and 243 deletions

View File

@@ -11,8 +11,7 @@ $config['db_name'] = "observium";
### Locations
$config['install_dir'] = "/opt/observium";
$config['html_dir'] = $config['install_dir'] . "/html";
$config['rrd_dir'] = "/opt/observium/rrd";
$config['temp_dir'] = "/tmp";
$config['rrd_dir'] = $config['install_dir'] . "/rrd";
$config['observer_log'] = $config['install_dir'] . "/observium.log";
### Enable the below to use rrdcached. be sure rrd_dir is within the rrdcached dir
@@ -20,188 +19,22 @@ $config['observer_log'] = $config['install_dir'] . "/observium.log";
#$config['rrdcached'] = "unix:/var/run/rrdcached.sock";
### Default community
$config['community'] = "public";
$config['snmp']['community'][] = "public";
### Authentication model
### Authentication Model
$config['auth_mechanism'] = "mysql"; # default, other options: ldap, http-auth
#$config['http_auth_guest'] = "guest"; # remember to configure this user if you use http-auth
# LDAP module configuration
$config['auth_ldap_server'] = "ldap.yourserver.com";
$config['auth_ldap_port'] = 389;
$config['auth_ldap_prefix'] = "uid=";
$config['auth_ldap_suffix'] = ",ou=People,dc=example,dc=com";
$config['auth_ldap_group'] = "cn=observium,ou=groups,dc=example,dc=com";
### Location of executables
$config['rrdtool'] = "/usr/bin/rrdtool";
$config['fping'] = "/usr/bin/fping";
$config['ipcalc'] = "/usr/bin/ipcalc";
$config['sipcalc'] = "/usr/bin/sipcalc";
$config['snmpwalk'] = "/usr/bin/snmpwalk";
$config['snmpget'] = "/usr/bin/snmpget";
$config['snmpbulkwalk'] = "/usr/bin/snmpbulkwalk";
$config['snmpset'] = "/usr/bin/snmpset";
### Application information. Multi-Tenant aware.
$config['branding'] = array(
# The default branding.
'default' => array(
'base_url' => "http://observium.example.com",
'mydomain' => "example.com",
'page_title' => "Observium",
# 'title_image' => "images/observer-logo.gif",
'stylesheet' => "css/styles.css",
'mono_font' => "DejaVuSansMono",
'header_color' => "#133A7B",
'favicon' => "images/observer-icon.png",
'page_gen' => 1,
'footer' => "",
),
# Example branding for a specifc URL.
'observium.branding.com' => array(
'base_url' => "http://observium.branding.com",
'mydomain' => "branding.com",
'page_title' => "Observium",
'title_image' => "images/observer-logo.gif",
'stylesheet' => "css/styles.css",
'mono_font' => "DejaVuSansMono",
'header_color' => "#133A7B",
'favicon' => "images/observer-icon.png",
'page_gen' => 0,
'footer' => "<a href='http://www.branding.com' target='_blank'>My Branding Company</a> - Slogan!",
),
);
### E-Mail information.
$config['email_default'] = "observium@example.com";
$config['email_from'] = "Observium <observium@example.com>";
$config['email_headers'] = "From: " . $config['email_from'] . "\r\n";
#$config['auth_ldap_server'] = "ldap.yourserver.com";
#$config['auth_ldap_port'] = 389;
#$config['auth_ldap_prefix'] = "uid=";
#$config['auth_ldap_suffix'] = ",ou=People,dc=example,dc=com";
#$config['auth_ldap_group'] = "cn=observium,ou=groups,dc=example,dc=com";
### List of networks to allow scanning-based discovery
$config['nets'] = array ("89.21.224.0/19", "212.9.12.0/24", "212.9.13.0/24");
$config['page_refresh'] = "0"; ## Refresh the page every xx seconds
$config['front_page'] = "pages/front/default.php";
$config['login_message'] = "Unauthorised access or use shall render the user liable to criminal and/or civil prosecution.";
### What should we warn about?
$config['warn']['ifdown'] = false;
## Should we autocreate hosts we see via discovery protocols?
$config['cdp_autocreate'] = false;
$config['snmp_autodiscovery'] = false;
### Which interface sections should we show?
$config['int_customers'] = 1; # Enable Customer Port Parsing
$config['int_transit'] = 1; # Enable Transit Types
$config['int_peering'] = 1; # Enable Peering Types
$config['int_core'] = 1; # Enable Core Port Types
$config['int_l2tp'] = 0; # Enable L2TP Port Types
$config['show_locations'] = 1; # Enable Locations on menu
$config['show_locations_dropdown'] = 0; # Enable Locations dropdown on menu
$config['show_services'] = 1; # Enable Services on menu
$config['ports_page_default'] = "details/";
# Default devices ports page display type. "details/", "graphs/bits/", etc
#$config['port_descr_parser'] = "includes/port-descr-parser.inc.php";
## Use parser to parse out ifAlias into type/descr/speed/circuit/notes
### Which additional features should we enable?
$config['enable_bgp'] = 1; # Enable BGP session collection and display
$config['enable_syslog'] = 0; # Enable Syslog
$config['enable_billing'] = 0; # Enable Billing
$config['enable_inventory'] = 1; # Enable Inventory
$config['enable_etherlike'] = 1; # Enable Etherlike
$config['enable_port_Xbcmc'] = 1; # Enable ifXEntry broadcast/multicast
$config['enable_pseudowires'] = 1; # Enable Pseudowires
$config['enable_ports_junoseatmvp'] = 0; # Enable JunOSe ATM VC Discovery/Poller
$config['enable_ports_etherlike'] = 0; # Enable Polling EtherLike-MIB (doubles interface processing time)
$config['enable_printers'] = 0; # Enable Printer support
#$config['rancid_configs'] = '/var/lib/rancid/network/configs/';
$config['rancid_ignorecomments'] = 0; # Ignore lines starting with #
#$config['collectd_dir'] = '/var/lib/collectd/rrd';
## If a syslog entry contails these strings it is deleted from the database
$config['syslog_filter'] = array("last message repeated", "Connection from UDP: [127.0.0.1]:");
$config['syslog_age'] = "1 month"; ## Time to keep syslog for in
## MySQL DATE_SUB format (eg '1 day', '1 month')
### Interface name strings to ignore
$config['bad_if'] = array("null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "lp0", "faith0",
"-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm", "container",
"async", "plip", "-physical", "-signalling", "control", "container", "unrouted",
"bri", "-bearer", "bluetooth", "isatap", "ras", "qos", "miniport", "sonet/sdh",
"span rp", "span sp", "sslvpn");
$config['bad_if_regexp'] = array("/serial[0-9]:/");
$config['allow_entity_sensor']['amperes'] = 1;
$config['allow_entity_sensor']['celsius'] = 1;
$config['allow_entity_sensor']['dBm'] = 1;
$config['allow_entity_sensor']['voltsDC'] = 1;
$config['allow_entity_sensor']['voltsAC'] = 1;
$config['allow_entity_sensor']['watts'] = 1;
$config['allow_entity_sensor']['truthvalue'] = 1;
$config['allow_entity_sensor']['specialEnum'] = 1;
### Hardcoded ASN descriptions
# $config['astext'][65333] = "Cymru Bogon Feed";
### Default warning settings
$config['defaults']['temp_limit'] = 60;
### Style Options
$list_colour_a = "#ffffff";
$list_colour_b = "#eeeeee";
$list_colour_a_a = "#f9f9f9";
$list_colour_a_b = "#f0f0f0";
$list_colour_b_a = "#f0f0f0";
$list_colour_b_b = "#e3e3e3";
$list_highlight = "#ffcccc";
$warn_colour_a = "#ffeeee";
$warn_colour_b = "#ffcccc";
/// Many colour schemes for graphs. Feel free to fiddle!
#$config['graph_colours'] = array("000066","330066","990066","990066","CC0033","FF0000"); ## Purple to Red
#$config['graph_colours'] = array("006600","336600","996600","996600","CC3300","FF0000"); ## Green to Red
#$config['graph_colours'] = array("002200","004400","006600","008800","00AA00","00CC00"); ## Green
#$config['graph_colours'] = array("220000","440000","660000","880000","AA0000","CC0000"); ## Red
#$config['graph_colours'] = array("001122","002244","003366","004488","0055AA","0066CC"); ## Blue
#$config['graph_colours'] = array("002233","004466","006699","0088CC","0099FF"); ## Sky-Blue
#$config['graph_colours'] = array("110022","330066","440088","6600AA","8800FF"); ## Purple
#$config['graph_colours'] = array("002200","004400","006600","008800","00AA00","00AA00","00CC00"); ## Forest Greens
#$config['graph_colours']['greens'] = array("112200","224400","336600","448800","66AA00","88FF00"); ## Grass Greens
#$config['graph_colours']['greens'] = array("95FFA7","4EFF97","33FF66","336600","224400","112200");
#$config['graph_colours']['greens'] = array("B7d6A9","8fcb73","50b91d","3ab419","0a8612","034f11");
#$config['graph_colours']['blues'] = array("b5d7ff","6eb7ff","0064ff","0082ff","0019d5","0016cb","00007d"); ## Cold Blues
$config['graph_colours']['mixed'] = array("CC0000", "008C00", "4096EE", "73880A", "D01F3C", "36393D", "FF0084");
$config['graph_colours']['greens'] = array('B6D14B','91B13C','6D912D','48721E','24520F','003300');
$config['graph_colours']['pinks'] = array('D0558F','B34773','943A57','792C38','5C1F1E','401F10');
$config['graph_colours']['blues'] = array('A0A0E5','8080BD','606096','40406F','202048','000033');
$config['graph_colours']['purples'] = array('CC7CCC','AF63AF','934A93','773177','5B185B','3F003F');
$config['graph_colours']['default'] = $config['graph_colours']['blues'];
$config['nets'][] = "172.22.0.0/16";
$config['nets'][] = "192.168.0.0/24";
include("includes/static-config.php");

View File

@@ -27,7 +27,11 @@ if($_GET['debug']) {
include("../includes/defaults.inc.php");
include("../config.php");
include("../includes/functions.php");
require('includes/collectd/config.php');
require('includes/collectd/functions.php');
require('includes/collectd/definitions.php');
include("includes/authenticate.inc.php");
if(!$_SESSION['authenticated']) { echo("not authenticated"); exit; }
function makeTextBlock($text, $fontfile, $fontsize, $width) {

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -18,6 +18,10 @@
error_reporting(E_ALL | E_NOTICE | E_WARNING);
require('includes/collectd/config.php');
require('includes/collectd/functions.php');
require('includes/collectd/definitions.php');
#require('config.php');
#require('functions.php');
#require('definitions.php');

View File

@@ -1,43 +1,67 @@
<?php
### Temporary Directory for graph generation
$config['temp_dir'] = "/tmp";
### Default directories
$config['temp_dir'] = "/tmp";
$config['install_dir'] = "/opt/observium";
$config['html_dir'] = $config['install_dir'] . "/html";
$config['rrd_dir'] = $config['install_dir'] . "/rrd";
$config['observium_log'] = $config['install_dir'] . "/observium.log";
### Location of executables
$config['sipcalc'] = "/usr/bin/sipcalc";
$config['rrdtool'] = "/usr/bin/rrdtool";
$config['fping'] = "/usr/bin/fping";
$config['ipcalc'] = "/usr/bin/ipcalc";
$config['snmpwalk'] = "/usr/bin/snmpwalk";
$config['snmpget'] = "/usr/bin/snmpget";
$config['snmpbulkwalk'] = "/usr/bin/snmpbulkwalk";
$config['whois'] = "/usr/bin/whois";
$config['ping'] = "/bin/ping";
$config['mtr'] = "/usr/bin/mtr";
$config['nmap'] = "/usr/bin/nmap";
$config['sipcalc'] = "/usr/bin/sipcalc";
$config['rrdtool'] = "/usr/bin/rrdtool";
$config['fping'] = "/usr/bin/fping";
$config['ipcalc'] = "/usr/bin/ipcalc";
$config['snmpwalk'] = "/usr/bin/snmpwalk";
$config['snmpget'] = "/usr/bin/snmpget";
$config['snmpbulkwalk'] = "/usr/bin/snmpbulkwalk";
$config['whois'] = "/usr/bin/whois";
$config['ping'] = "/bin/ping";
$config['mtr'] = "/usr/bin/mtr";
$config['nmap'] = "/usr/bin/nmap";
$config['nagios_plugins'] = "/usr/lib/nagios/plugins";
### Local Specifics
### RRDCacheD - Make sure it can write to your RRD dir!
$config['title_image'] = "images/observer-logo.gif";
#$config['rrdcached'] = "unix:/var/run/rrdcached.sock";
### Web Interface Settings
$config['title_image'] = "images/observium-logo.png";
$config['stylesheet'] = "css/styles.css";
$config['mono_font'] = "DejaVuSansMono";
$config['favicon'] = "favicon.ico";
$config['header_color'] = "#1F334E";
$config['page_refresh'] = "30"; ## Refresh the page every xx seconds
$config['page_refresh'] = "300"; ## Refresh the page every xx seconds
$config['frong_page'] = "pages/front/default.php";
$config['page_title'] = "ObserverNMS";
$config['syslog_age'] = "1 month";
$config['page_title'] = "Observium :: Network Observation and Monitoring";
$config['timestamp_format'] = 'd-m-Y H:i:s';
$config['page_gen'] = 1;
$config['web_header'] = "header.inc.php"; # in html/includes
$config['login_message'] = "Unauthorised access or use shall render the user liable to criminal and/or civil prosecution.";
### SNMP settings
$config['snmp']['timeout'] = 300; # timeout in ms
$config['snmp']['retries'] = 6; # how many times to retry the query
$config['int_customers'] = 1; # Enable Customer Port Parsing
$config['int_transit'] = 1; # Enable Transit Types
$config['int_peering'] = 1; # Enable Peering Types
$config['int_core'] = 1; # Enable Core Port Types
$config['int_l2tp'] = 0; # Enable L2TP Port Types
$config['show_locations'] = 1; # Enable Locations on menu
$config['show_locations_dropdown'] = 1; # Enable Locations dropdown on menu
$config['show_services'] = 1; # Enable Services on menu
$config['ports_page_default'] = "details/"; ## eg "details/" "graphs/bits/"
### SNMP Settings
$config['snmp']['timeout'] = 300; # timeout in ms
$config['snmp']['retries'] = 6; # how many times to retry the query
$config['snmp']['community'][] = "public"; # Communities to try during discovery (dangerous)
### Autodiscovery Settings
$config['cdp_autocreate'] = false; ## Autodiscover unknown hosts seen via CDP
$config['snmp_autodiscovery'] = false; ## Autodiscover hosts on new subnets
### Alerting Settings
@@ -61,6 +85,19 @@ $list_highlight = "#ffcccc";
$warn_colour_a = "#ffeeee";
$warn_colour_b = "#ffcccc";
#$config['graph_colours'] = array("000066","330066","990066","990066","CC0033","FF0000"); ## Purple to Red
#$config['graph_colours'] = array("006600","336600","996600","996600","CC3300","FF0000"); ## Green to Red
#$config['graph_colours'] = array("002200","004400","006600","008800","00AA00","00CC00"); ## Green
#$config['graph_colours'] = array("220000","440000","660000","880000","AA0000","CC0000"); ## Red
#$config['graph_colours'] = array("001122","002244","003366","004488","0055AA","0066CC"); ## Blue
#$config['graph_colours'] = array("002233","004466","006699","0088CC","0099FF"); ## Sky-Blue
#$config['graph_colours'] = array("110022","330066","440088","6600AA","8800FF"); ## Purple
#$config['graph_colours'] = array("002200","004400","006600","008800","00AA00","00AA00","00CC00"); ## Forest Greens
#$config['graph_colours']['greens'] = array("112200","224400","336600","448800","66AA00","88FF00"); ## Grass Greens
#$config['graph_colours']['greens'] = array("95FFA7","4EFF97","33FF66","336600","224400","112200");
#$config['graph_colours']['greens'] = array("B7d6A9","8fcb73","50b91d","3ab419","0a8612","034f11");
#$config['graph_colours']['blues'] = array("b5d7ff","6eb7ff","0064ff","0082ff","0019d5","0016cb","00007d"); ## Cold Blues
$config['graph_colours']['mixed'] = array('CC0000','008C00','4096EE','73880A','D01F3C','36393D','FF0084');
$config['graph_colours']['greens'] = array('B6D14B','91B13C','6D912D','48721E','24520F','003300');
$config['graph_colours']['pinks'] = array('D0558F','B34773','943A57','792C38','5C1F1E','401F10');
@@ -76,10 +113,26 @@ $config['show_overview_tab'] = true;
$config['overview_show_sysDescr'] = true;
## Poller Modules
### Poller/Discovery Modules
$config['enable_port_Xbcmc'] = 1; # Enable ifXEntry broadcast/multicast
$config['port_descr_parser'] = "includes/port-descr-parser.inc.php"; # Parse port descriptions into fields
$config['enable_port_Xbcmc'] = 1; # Enable ifXEntry broadcast/multicast
$config['port_descr_parser'] = "includes/port-descr-parser.inc.php"; # Parse port descriptions into fields
$config['enable_bgp'] = 1; # Enable BGP session collection and display
$config['enable_syslog'] = 0; # Enable Syslog
$config['enable_billing'] = 0; # Enable Billing
$config['enable_inventory'] = 1; # Enable Inventory
$config['enable_etherlike'] = 1; # Enable Etherlike
$config['enable_port_Xbcmc'] = 1; # Enable ifXEntry broadcast/multicast
$config['enable_pseudowires'] = 1; # Enable Pseudowires
$config['enable_ports_junoseatmvp'] = 0; # Enable JunOSe ATM VC Discovery/Poller
$config['enable_ports_etherlike'] = 0; # Enable Polling EtherLike-MIB (doubles interface processing time)
$config['enable_printers'] = 0; # Enable Printer support
### External Integration
#$config['rancid_configs'] = '/var/lib/rancid/network/configs/';
$config['rancid_ignorecomments'] = 0; # Ignore lines starting with #
#$config['collectd_dir'] = '/var/lib/collectd/rrd';
### Ignores & Allows
@@ -87,7 +140,7 @@ $config['port_descr_parser'] = "includes/port-descr-parser.inc.php"; # Parse po
$config['bad_if'] = array("voip-null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "lp0", "faith0",
"-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm", "container",
"async", "plip", "-physical", "-signalling", "control", "container", "unrouted",
"bri", "-bearer", "ng", "bluetooth", "isatap", "ras", "qos", "miniport", "sonet/sdh",
"bri", "-bearer", "bluetooth", "isatap", "ras", "qos", "miniport", "sonet/sdh",
"span rp", "span sp", "sslvpn");
$config['bad_if_regexp'] = array("/serial[0-9]:/");
@@ -101,12 +154,12 @@ $config['ignore_mount_optical'] = 1; # Ignore mounted optical discs
$config['device_traffic_iftype'] = array('/loopback/','/other/','/tunnel/','/virtual/','/mpls/');
$config['device_traffic_descr'] = array('/loopback/','/vlan/','/tunnel/','/:\d+/');
# Authentication
### Authentication
$config['allow_unauth_graphs'] = 0; ## Allow graphs to be viewed by anyone
$config['auth_mechanism'] = "mysql"; # Auth Type.
# Sensors
### Sensors
$config['allow_entity_sensor']['amperes'] = 1;
$config['allow_entity_sensor']['celsius'] = 1;
@@ -117,12 +170,12 @@ $config['allow_entity_sensor']['watts'] = 1;
$config['allow_entity_sensor']['truthvalue'] = 1;
$config['allow_entity_sensor']['specialEnum'] = 1;
# Set default alert limits for various sensors and metrics
### Set default alert limits for various sensors and metrics
$config['limit']['fan'] = "1000";
$config['limit']['temp'] = "60";
# Filesystems
### Filesystems
$config['ignore_mount'] = array("/kern", "/mnt/cdrom", "/proc", "/dev");
$config['ignore_mount_string'] = array("packages", "devfs", "procfs", "UMA", "MALLOC");
@@ -132,20 +185,31 @@ $config['ignore_mount_network'] = 1; # Ignore network mounted storage
$config['ignore_junos_os_drives'] = array("/on: \/packages/", "/on: \/dev/", "/on: \/proc/", "/on: \/junos^/", "/on: \/junos\/dev/", "/on: \/jail\/dev/", "/^(dev|proc)fs/", "/^\/dev\/md0/"); # Ignore JunOS partitions who are always 100%
$config['ignore_bsd_os_drives'] = array("/^\/dev,/", "/^\/var\/dhcpd\/dev,/", "/UMA/"); # Ignore BSD partitions who are always 100%
# Poller/Discovery
### Poller/Discovery
$config['enable_ports_etherlike'] = 0; # Enable EtherLike-MIB
$config['enable_ports_junoseatmvp'] = 0; # Enable JunOSe ATM VC Discovery/Poller
## Logging
### Syslog Settings
$config['syslog_age'] = "1 month"; ## Entries older than this will be removed
$config['syslog_filter'] = array("last message repeated", "Connection from UDP: [",
"ipSystemStatsTable node ipSystemStatsOutFragOKs not implemented",
"diskio.c: don't know how to handle"); ## Ignore some crappy stuff from SNMP daemon
# LDAP Authentication
### LDAP Authentication
$config['auth_ldap_version'] = 3; # v2 or v3
### Hardcoded ASN descriptions
$config['astext'][65333] = "Cymru Bogon Feed";
### Default warning settings
$config['defaults']['temp_limit'] = 60;
### What should we warn about?
$config['warn']['ifdown'] = false;
?>

View File

@@ -5,7 +5,7 @@
include_once("Net/IPv4.php");
include_once("Net/IPv6.php");
## ObserverNMS Includes
## Observium Includes
include_once($config['install_dir'] . "/includes/common.php");
include_once($config['install_dir'] . "/includes/rrdtool.inc.php");
@@ -19,12 +19,6 @@ include_once($config['install_dir'] . "/includes/rewrites.php");
include_once($config['install_dir'] . "/includes/snmp.inc.php");
include_once($config['install_dir'] . "/includes/services.inc.php");
## CollectD
require('collectd/config.php');
require('collectd/functions.php');
require('collectd/definitions.php');
function mac_clean_to_readable($mac)
{
$r = substr($mac, 0, 2);

View File

@@ -1,7 +1,7 @@
<?php
## Very basic parser to parse classic ObserverNMS-type schemes.
## Very basic parser to parse classic Observium-type schemes.
## Parser should populate $port_ifAlias array with type, descr, circuit, speed and notes
unset ($port_ifAlias);

View File

@@ -265,25 +265,6 @@ $config['os']['3com']['overgraph'][] = "";
$config['os']['3com']['overtext'] = "";
$config['os']['3com']['type'] = "network";
if(!$config['graph_colours']['greens']) {
$config['graph_colours']['greens'] = array('B6D14B','91B13C','6D912D','48721E','24520F','003300');
}
if(!$config['graph_colours']['pinks']) {
$config['graph_colours']['pinks'] = array('D0558F','B34773','943A57','792C38','5C1F1E','401F10');
}
if(!$config['graph_colours']['blues']) {
$config['graph_colours']['blues'] = array('A0A0E5','8080BD','606096','40406F','202048','000033');
}
if(!$config['graph_colours']['purples']) {
$config['graph_colours']['purples'] = array('CC7CCC','AF63AF','934A93','773177','5B185B','3F003F');
}
if(!$config['graph_colours']['default']) {
$config['graph_colours']['default'] = $config['graph_colours']['blues'];
}
if(!$config['graph_colours']['mixed']) {
$config['graph_colours']['mixed'] = array("CC0000", "008C00", "4096EE", "73880A", "D01F3C", "36393D", "FF0084");
}
$device_types = array('server','network','firewall','workstation','printer','power', 'environment');
##############################
@@ -315,13 +296,13 @@ if(isset($_SERVER['HTTPS'])) {
}
### Connect to database
$observernms_link = mysql_pconnect($config['db_host'], $config['db_user'], $config['db_pass']);
if (!$observernms_link) {
echo "<h2>ObserverNMS MySQL Error</h2>";
$observium_link = mysql_pconnect($config['db_host'], $config['db_user'], $config['db_pass']);
if (!$observium_link) {
echo "<h2>Observer MySQL Error</h2>";
echo mysql_error();
die;
}
$observernms_db = mysql_select_db($config['db_name'], $observernms_link);
$observium_db = mysql_select_db($config['db_name'], $observium_link);
# Set some times needed by loads of scripts (it's dynamic, so we do it here!)