mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Merge pull request #405 from caseycs/sphinx_configurable_params
make host/port configurable
This commit is contained in:
commit
7216b55570
2 changed files with 18 additions and 2 deletions
|
@ -4,8 +4,16 @@
|
|||
* @author: Konstantin Kuklin <konstantin.kuklin@gmail.com>
|
||||
* Date: 24.05.12
|
||||
*/
|
||||
$host = getenv('host');
|
||||
$port = getenv('port');
|
||||
|
||||
$sCommandSystem = "echo 'show status;' | mysql -h127.0.0.1 -P9306 | grep connections | awk '{ print $2}';";
|
||||
if (!$host)
|
||||
$host = '127.0.0.1';
|
||||
|
||||
if (!$port)
|
||||
$port = 9306;
|
||||
|
||||
$sCommandSystem = "echo 'show status;' | mysql -h{$host} -P{$port} | grep connections | awk '{ print $2}';";
|
||||
$sTmpFilePath = "/tmp/sphinx_connections";
|
||||
|
||||
if (isset($argc) && $argc > 1) {
|
||||
|
|
|
@ -4,8 +4,16 @@
|
|||
* @author: Konstantin Kuklin <konstantin.kuklin@gmail.com>
|
||||
* Date: 24.05.12
|
||||
*/
|
||||
$host = getenv('host');
|
||||
$port = getenv('port');
|
||||
|
||||
$sCommandSystem = "echo 'show status;' | mysql -h127.0.0.1 -P9306 | grep '^queries' | awk '{ print $2}';";
|
||||
if (!$host)
|
||||
$host = '127.0.0.1';
|
||||
|
||||
if (!$port)
|
||||
$port = 9306;
|
||||
|
||||
$sCommandSystem = "echo 'show status;' | mysql -h{$host} -P{$port} | grep '^queries' | awk '{ print $2}';";
|
||||
$sTmpFilePath = "/tmp/sphinx_queries";
|
||||
|
||||
if (isset($argc) && $argc > 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue