Skip to content
Snippets Groups Projects
Commit 72d35e70 authored by hahn's avatar hahn
Browse files

update appmonitor client; add load and apache status

parent 40ecaa3c
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ if(!defined('RESULT_OK')){ ...@@ -49,7 +49,7 @@ if(!defined('RESULT_OK')){
* 2019-05-31 0.87 axel.hahn@iml.unibe.ch add timeout as param in connective checks (http, tcp, databases)<br> * 2019-05-31 0.87 axel.hahn@iml.unibe.ch add timeout as param in connective checks (http, tcp, databases)<br>
* 2019-06-05 0.88 axel.hahn@iml.unibe.ch add plugins<br> * 2019-06-05 0.88 axel.hahn@iml.unibe.ch add plugins<br>
* --------------------------------------------------------------------------------<br> * --------------------------------------------------------------------------------<br>
* @version 0.89 * @version 0.91
* @author Axel Hahn * @author Axel Hahn
* @link TODO * @link TODO
* @license GPL * @license GPL
...@@ -906,10 +906,18 @@ class appmonitorcheck { ...@@ -906,10 +906,18 @@ class appmonitorcheck {
$this->_setReturn(RESULT_ERROR, "ERROR: Sqlite database file " . $aParams["db"] . " does not exist."); $this->_setReturn(RESULT_ERROR, "ERROR: Sqlite database file " . $aParams["db"] . " does not exist.");
return false; return false;
} }
if(!isset($aParams['user'])){
$aParams['user']='';
}
if(!isset($aParams['password'])){
$aParams['password']='';
}
try { try {
// $db = new SQLite3($sqliteDB); // $db = new SQLite3($sqliteDB);
// $db = new PDO("sqlite:".$sqliteDB); // $db = new PDO("sqlite:".$sqliteDB);
$o = new PDO("sqlite:" . $aParams["db"], $o = new PDO("sqlite:" . $aParams["db"],
$aParams['user'],
$aParams['password'],
array( array(
PDO::ATTR_TIMEOUT => (isset($aParams["timeout"]) && (int)$aParams["timeout"]) ? (int)$aParams["timeout"] : $this->_iTimeoutTcp, PDO::ATTR_TIMEOUT => (isset($aParams["timeout"]) && (int)$aParams["timeout"]) ? (int)$aParams["timeout"] : $this->_iTimeoutTcp,
) )
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
* 2018-11-05 0.58 axel.hahn@iml.unibe.ch additional flag in http check to show content<br> * 2018-11-05 0.58 axel.hahn@iml.unibe.ch additional flag in http check to show content<br>
* 2019-05-31 0.87 axel.hahn@iml.unibe.ch add timeout as param in connective checks (http, tcp, databases)<br> * 2019-05-31 0.87 axel.hahn@iml.unibe.ch add timeout as param in connective checks (http, tcp, databases)<br>
* --------------------------------------------------------------------------------<br> * --------------------------------------------------------------------------------<br>
* @version 0.88 * @version 0.91
* @author Axel Hahn * @author Axel Hahn
* @link TODO * @link TODO
* @license GPL * @license GPL
...@@ -51,7 +51,7 @@ class appmonitor { ...@@ -51,7 +51,7 @@ class appmonitor {
* value is in seconds * value is in seconds
* @var int * @var int
*/ */
protected $_sVersion = 'php-client-v0.89'; protected $_sVersion = 'php-client-v0.91';
/** /**
* config: default ttl for server before requesting the client check again * config: default ttl for server before requesting the client check again
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment