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

2064-update appmonitor client

* Client wurde aktualisiert.
* IP-Restriction gesetzt
* neu 8 Checks (vorher 2)
* FIX: add slash in the sqlite check
* set tags
parent 57b7dfc2
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,6 @@ $oMonitor->checkIp(array(
// $oMonitor->checkTokem('token', '123');
// ----------------------------------------------------------------------
// NOTIFICATION
// ----------------------------------------------------------------------
......@@ -39,3 +38,24 @@ $oMonitor->checkIp(array(
// $oMonitor->addEmail('sysadmin@example.com');
// $oMonitor->addSlackWebhook(array("mywebhook"=> "https://hooks.slack.com/services/(...)"));
$oMonitor->addEmail('axel.hahn@iml.unibe.ch');
// ----------------------------------------------------------------------
// set a tag with phase
// ----------------------------------------------------------------------
$sHost=$_SERVER['HTTP_HOST'];
$sHost2=$sHost=php_uname("n");
$sMyPhase='live';
foreach (array('dev', 'preview', 'stage', 'demo') as $sPhase){
if(
strstr($sHost.'.', $sPhase)!==false
|| strstr($sHost.'-', $sPhase)!==false
|| strstr($sHost2.'.', $sPhase)!==false
|| strstr($sHost2.'-', $sPhase)!==false
) {
$sMyPhase=$sPhase;
break;
}
}
$oMonitor->addTag($sMyPhase);
......@@ -4,6 +4,7 @@ require_once('classes/appmonitor-client.class.php');
$oMonitor = new appmonitor();
@include 'general_include.php';
$oMonitor->addTag('deployment');
$oMonitor->addCheck(
array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment