Nagios MySQL Error";
die;
}
$nagios_db = mysql_select_db($config['nagios_db_name'], $nagios_link);
}
# If we're on SSL, let's properly detect it
if(isset($_SERVER['HTTPS'])) {
$config['base_url'] = preg_replace('/^http:/','https:', $config['base_url']);
}
### Connect to database
$observium_link = mysql_pconnect($config['db_host'], $config['db_user'], $config['db_pass']);
if (!$observium_link) {
echo "
Observer MySQL Error
";
echo mysql_error();
die;
}
$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!)
$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);
$config['now'] = $now;
$config['day'] = $day;
$config['twoday'] = $twoday;
$config['week'] = $week;
$config['month'] = $month;
$config['year'] = $year;
?>