mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
make host/port configurable
This commit is contained in:
parent
04e9d5bfa1
commit
274440f2b2
@ -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…
Reference in New Issue
Block a user