Skip to content

Commit

Permalink
Merge pull request #136 from anderskvist/dynamic_config
Browse files Browse the repository at this point in the history
Dynamic config
  • Loading branch information
TeeKraken authored Sep 16, 2016
2 parents bfe7676 + 6fc6465 commit d265ec7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
14 changes: 14 additions & 0 deletions conf/datasource_localhost.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
$conf['datasources']['localhost'] = array(
'host' => 'localhost',
'port' => 3306,
'db' => 'slow_query_log',
'user' => 'root',
'password' => '',
'tables' => array(
'global_query_review' => 'fact',
'global_query_review_history' => 'dimension'
),
'source_type' => 'slow_query_log'
);

16 changes: 4 additions & 12 deletions conf/sample.config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,10 @@
* one you want to report on.
*
*/
$conf['datasources']['localhost'] = array(
'host' => 'localhost',
'port' => 3306,
'db' => 'slow_query_log',
'user' => 'root',
'password' => '',
'tables' => array(
'global_query_review' => 'fact',
'global_query_review_history' => 'dimension'
),
'source_type' => 'slow_query_log'
);

foreach(glob("conf/datasource_*.inc.php") as $datasource) {
require_once($datasource);
}

/**
* If you're using Anemometer with MySQL 5.6's performance schema,
Expand Down

0 comments on commit d265ec7

Please sign in to comment.