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
Branches
No related tags found
No related merge requests found
...@@ -31,11 +31,31 @@ $oMonitor->checkIp(array( ...@@ -31,11 +31,31 @@ $oMonitor->checkIp(array(
// $oMonitor->checkTokem('token', '123'); // $oMonitor->checkTokem('token', '123');
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// NOTIFICATION // NOTIFICATION
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// $oMonitor->addEmail('sysadmin@example.com'); // $oMonitor->addEmail('sysadmin@example.com');
// $oMonitor->addSlackWebhook(array("mywebhook"=> "https://hooks.slack.com/services/(...)")); // $oMonitor->addSlackWebhook(array("mywebhook"=> "https://hooks.slack.com/services/(...)"));
$oMonitor->addEmail('axel.hahn@iml.unibe.ch'); $oMonitor->addEmail('axel.hahn@iml.unibe.ch');
\ No newline at end of file
// ----------------------------------------------------------------------
// 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'); ...@@ -4,6 +4,7 @@ require_once('classes/appmonitor-client.class.php');
$oMonitor = new appmonitor(); $oMonitor = new appmonitor();
@include 'general_include.php'; @include 'general_include.php';
$oMonitor->addTag('deployment');
$oMonitor->addCheck( $oMonitor->addCheck(
array( array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment