mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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!)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user