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'] = time(); $config['day'] = time() - (24 * 60 * 60); $config['twoday'] = time() - (2 * 24 * 60 * 60); $config['week'] = time() - (7 * 24 * 60 * 60); $config['twoweek'] = time() - (2 * 7 * 24 * 60 * 60); $config['month'] = time() - (31 * 24 * 60 * 60); $config['twomonth'] = time() - (2 * 31 * 24 * 60 * 60); $config['threemonth'] = time() - (3 * 31 * 24 * 60 * 60); $config['year'] = time() - (365 * 24 * 60 * 60); # IPMI sensor type mappings $ipmi_unit['Volts'] = 'voltage'; $ipmi_unit['degrees C'] = 'temperature'; $ipmi_unit['RPM'] = 'fanspeed'; $ipmi_unit['Watts'] = ''; $ipmi_unit['discrete'] = ''; ## INCLUDE THE VMWARE DEFINITION FILE. require_once("vmware_guestid.inc.php"); ?>