Add support for memcached to poller for current bps/pps for ports and ability to disable writing these values to MySQL. HIGHLY RECOMMENDED FOR LARGE INSTALLS. Also PROCEED WITH CAUTION.

git-svn-id: http://www.observium.org/svn/observer/trunk@2955 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-04-04 18:10:45 +00:00
parent d16f4b30ae
commit e44c47cabd
5 changed files with 87 additions and 22 deletions

View File

@@ -1125,11 +1125,12 @@ if (!$observium_link)
}
$observium_db = mysql_select_db($config['db_name'], $observium_link);
#try {
# $db = new PDO('mysql:host='.$config['db_host'].';dbname='.$config['db_name'], $config['db_user'], $config['db_pass']);
#} catch (PDOException $e) {
# print "Error!: " . $e->getMessage() . "<br/>";
#}
if($config['memcached']['enable'])
{
$memcache = new Memcached();
$memcache->addServer($config['memcached']['host'], $config['memcached']['port']);
if($debug) { print_r($memcache->getStats()); }
}
# Set some times needed by loads of scripts (it's dynamic, so we do it here!)