diff --git "a/docs/10_\360\237\224\210_Introduction.md" b/docs/10_Introduction.md similarity index 100% rename from "docs/10_\360\237\224\210_Introduction.md" rename to docs/10_Introduction.md diff --git "a/docs/20_\360\237\222\241_How_does_it_work.md" b/docs/20_How_does_it_work.md similarity index 100% rename from "docs/20_\360\237\222\241_How_does_it_work.md" rename to docs/20_How_does_it_work.md diff --git "a/docs/40_\360\237\223\246_Server/10_Installation.md" b/docs/40_Server/10_Installation.md similarity index 100% rename from "docs/40_\360\237\223\246_Server/10_Installation.md" rename to docs/40_Server/10_Installation.md diff --git "a/docs/40_\360\237\223\246_Server/20_Configuration.md" b/docs/40_Server/20_Configuration.md similarity index 85% rename from "docs/40_\360\237\223\246_Server/20_Configuration.md" rename to docs/40_Server/20_Configuration.md index b8403ff..84b960f 100644 --- "a/docs/40_\360\237\223\246_Server/20_Configuration.md" +++ b/docs/40_Server/20_Configuration.md @@ -1,3 +1,8 @@ +--- +title: Server configuration +keywords: "files, settings, configuration" +--- + ## Configuration files The config is in json syntax. The files are located in @@ -64,6 +69,7 @@ appmonitor-server-config-defaults.json to appmonitor-server-config.json "age": true, "checks": true, "times": true, + "tags": true, "receiver": true, "notification": true } @@ -239,3 +245,41 @@ Example: The list of appmonitor client urls is in appmonitor-server-urls.json. This file is not part of the repository. It will be created if you store the first url. + +## View + +The key "view" has 2 subnodes + +* "overview" - tiles to show on application overview page +* "appdetails" - tiles to show on application detail page + +key | description +--------------------|--------------------------- +validationwarnings | Show validation warnings in app overview and app detail page + +### view:overview + +Set it true or false to set the visibility. + +Key | Description +---------------|--------------------------- +"webapps" | number of web applications +"hosts" | number of hosts +"checks" | number of checks total for all web apps +"notification" | show stats if notifications are currently enabled + +### view:appdetails + +Set it true or false to set the visibility. + +Key | Description +---------------|--------------------------- +"appstatus" | number of web applications +"httpcode" | http status code of last check +"age" | age of the currently visible information and TTL +"checks" | number of checks total for current web app +"times" | total time to perform all checks of the web app (if available) +"tags" | show count of tags and its names +"receiver" | show app specific notification recerivers +"notification" | show stats if notifications are currently enabled + diff --git "a/docs/40_\360\237\223\246_Server/30_Notification.md" b/docs/40_Server/30_Notification.md similarity index 97% rename from "docs/40_\360\237\223\246_Server/30_Notification.md" rename to docs/40_Server/30_Notification.md index ed97359..3ec1f0e 100644 --- "a/docs/40_\360\237\223\246_Server/30_Notification.md" +++ b/docs/40_Server/30_Notification.md @@ -1,3 +1,8 @@ +--- +title: Notifications +keywords: "email, slack, application specific receivers, global receivers" +--- + ## Introduction Notifications will be triggered if ... diff --git "a/docs/40_\360\237\223\246_Server/40_Service.md" b/docs/40_Server/40_Service.md similarity index 100% rename from "docs/40_\360\237\223\246_Server/40_Service.md" rename to docs/40_Server/40_Service.md diff --git "a/docs/40_\360\237\223\246_Server/50_Cli.md" b/docs/40_Server/50_Cli.md similarity index 100% rename from "docs/40_\360\237\223\246_Server/50_Cli.md" rename to docs/40_Server/50_Cli.md diff --git "a/docs/40_\360\237\223\246_Server/60_API.md" b/docs/40_Server/60_API.md similarity index 100% rename from "docs/40_\360\237\223\246_Server/60_API.md" rename to docs/40_Server/60_API.md diff --git "a/docs/40_\360\237\223\246_Server/70_Security.md" b/docs/40_Server/70_Security.md similarity index 100% rename from "docs/40_\360\237\223\246_Server/70_Security.md" rename to docs/40_Server/70_Security.md diff --git "a/docs/40_\360\237\223\246_Server/80_Maintenance.md" b/docs/40_Server/80_Maintenance.md similarity index 100% rename from "docs/40_\360\237\223\246_Server/80_Maintenance.md" rename to docs/40_Server/80_Maintenance.md diff --git "a/docs/40_\360\237\223\246_Server/_index.md" b/docs/40_Server/_index.md similarity index 100% rename from "docs/40_\360\237\223\246_Server/_index.md" rename to docs/40_Server/_index.md diff --git "a/docs/50_\360\237\247\276_Client/10_Introduction.md" b/docs/50_Client/10_Introduction.md similarity index 100% rename from "docs/50_\360\237\247\276_Client/10_Introduction.md" rename to docs/50_Client/10_Introduction.md diff --git "a/docs/50_\360\237\247\276_Client/20_Description_of_response.md" b/docs/50_Client/20_Description_of_response.md similarity index 100% rename from "docs/50_\360\237\247\276_Client/20_Description_of_response.md" rename to docs/50_Client/20_Description_of_response.md diff --git "a/docs/50_\360\237\247\276_Client/_index.md" b/docs/50_Client/_index.md similarity index 100% rename from "docs/50_\360\237\247\276_Client/_index.md" rename to docs/50_Client/_index.md diff --git "a/docs/60_\360\237\223\203_PHP-client/10_Introduction.md" b/docs/60_PHP-client/10_Introduction.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/10_Introduction.md" rename to docs/60_PHP-client/10_Introduction.md diff --git "a/docs/60_\360\237\223\203_PHP-client/20_Install_PHP-client.md" b/docs/60_PHP-client/20_Install_PHP-client.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/20_Install_PHP-client.md" rename to docs/60_PHP-client/20_Install_PHP-client.md diff --git "a/docs/60_\360\237\223\203_PHP-client/30_Monitor_an_application.md" b/docs/60_PHP-client/30_Monitor_an_application.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/30_Monitor_an_application.md" rename to docs/60_PHP-client/30_Monitor_an_application.md diff --git "a/docs/60_\360\237\223\203_PHP-client/40_Check_items.md" b/docs/60_PHP-client/40_Check_items.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/40_Check_items.md" rename to docs/60_PHP-client/40_Check_items.md diff --git "a/docs/60_\360\237\223\203_PHP-client/50_Groups_of_checks.md" b/docs/60_PHP-client/50_Groups_of_checks.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/50_Groups_of_checks.md" rename to docs/60_PHP-client/50_Groups_of_checks.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/10_Apps/10_Introduction.md" b/docs/60_PHP-client/60_Plugins/10_Apps/10_Introduction.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/10_Apps/10_Introduction.md" rename to docs/60_PHP-client/60_Plugins/10_Apps/10_Introduction.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/10_Apps/Concrete5.md" b/docs/60_PHP-client/60_Plugins/10_Apps/Concrete5.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/10_Apps/Concrete5.md" rename to docs/60_PHP-client/60_Plugins/10_Apps/Concrete5.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/10_Apps/Wordpress.md" b/docs/60_PHP-client/60_Plugins/10_Apps/Wordpress.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/10_Apps/Wordpress.md" rename to docs/60_PHP-client/60_Plugins/10_Apps/Wordpress.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/10_Apps/_index.md" b/docs/60_PHP-client/60_Plugins/10_Apps/_index.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/10_Apps/_index.md" rename to docs/60_PHP-client/60_Plugins/10_Apps/_index.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/_index.md" b/docs/60_PHP-client/60_Plugins/20_Checks/_index.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/_index.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/_index.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/_skeleton.txt" b/docs/60_PHP-client/60_Plugins/20_Checks/_skeleton.txt similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/_skeleton.txt" rename to docs/60_PHP-client/60_Plugins/20_Checks/_skeleton.txt diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/apacheprocesses.md" b/docs/60_PHP-client/60_Plugins/20_Checks/apacheprocesses.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/apacheprocesses.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/apacheprocesses.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/cert.md" b/docs/60_PHP-client/60_Plugins/20_Checks/cert.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/cert.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/cert.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/diskfree.md" b/docs/60_PHP-client/60_Plugins/20_Checks/diskfree.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/diskfree.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/diskfree.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/exec.md" b/docs/60_PHP-client/60_Plugins/20_Checks/exec.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/exec.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/exec.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/file.md" b/docs/60_PHP-client/60_Plugins/20_Checks/file.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/file.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/file.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/httpcontent.md" b/docs/60_PHP-client/60_Plugins/20_Checks/httpcontent.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/httpcontent.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/httpcontent.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/loadmeter.md" b/docs/60_PHP-client/60_Plugins/20_Checks/loadmeter.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/loadmeter.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/loadmeter.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/mysqlconnect.md" b/docs/60_PHP-client/60_Plugins/20_Checks/mysqlconnect.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/mysqlconnect.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/mysqlconnect.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/pdoconnect.md" b/docs/60_PHP-client/60_Plugins/20_Checks/pdoconnect.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/pdoconnect.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/pdoconnect.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/phpmodules.md" b/docs/60_PHP-client/60_Plugins/20_Checks/phpmodules.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/phpmodules.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/phpmodules.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/ping.md" b/docs/60_PHP-client/60_Plugins/20_Checks/ping.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/ping.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/ping.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/porttcp.md" b/docs/60_PHP-client/60_Plugins/20_Checks/porttcp.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/porttcp.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/porttcp.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/simple.md" b/docs/60_PHP-client/60_Plugins/20_Checks/simple.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/simple.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/simple.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/sqliteconnect.md" b/docs/60_PHP-client/60_Plugins/20_Checks/sqliteconnect.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/20_Checks/sqliteconnect.md" rename to docs/60_PHP-client/60_Plugins/20_Checks/sqliteconnect.md diff --git "a/docs/60_\360\237\223\203_PHP-client/60_Plugins/_index.md" b/docs/60_PHP-client/60_Plugins/_index.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/60_Plugins/_index.md" rename to docs/60_PHP-client/60_Plugins/_index.md diff --git "a/docs/60_\360\237\223\203_PHP-client/70_Write_checks.md" b/docs/60_PHP-client/70_Write_checks.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/70_Write_checks.md" rename to docs/60_PHP-client/70_Write_checks.md diff --git "a/docs/60_\360\237\223\203_PHP-client/_index.md" b/docs/60_PHP-client/_index.md similarity index 100% rename from "docs/60_\360\237\223\203_PHP-client/_index.md" rename to docs/60_PHP-client/_index.md diff --git a/public_html/pmu b/public_html/pmu new file mode 100755 index 0000000..7f4adb6 --- /dev/null +++ b/public_html/pmu @@ -0,0 +1,85 @@ +#!/bin/bash +# ====================================================================== +# +# pmu - process memory usage +# +# ---------------------------------------------------------------------- +# 2013-07-31 v1.0 Axel Hahn +# 2023-01-10 v1.1 Axel Hahn shell fixes; add total status +# 2023-12-22 v1.2 Axel Hahn speedup factor 5..10 +# ====================================================================== + +typeset -i lines=0 +_version=1.2 + +# ---------------------------------------------------------------------- +# MAIN +# ---------------------------------------------------------------------- + +echo "_______________________________________________________________________________ + +>>>> Memory usage by each process in MB v$_version +" + +# ----- show help +if [ "$1" = "-?" -o "$1" = "-h" -o "$1" = "--help" ]; then + self=$( basename $0 ) +cat </dev/null + done | sort -k 2 -n -r +) + +# ----- output for processes +lines=$1 +echo "process total MB count average MB" +echo "--------------- ---------- ----- ----------" + +if [ $lines -gt 0 ]; then + echo "$pslist2" | head -$lines +else + echo "$pslist2" +fi +echo + +exit + +# ---------------------------------------------------------------------- diff --git a/public_html/server/classes/appmonitor-server-gui.class.php b/public_html/server/classes/appmonitor-server-gui.class.php index be360e7..e85513b 100755 --- a/public_html/server/classes/appmonitor-server-gui.class.php +++ b/public_html/server/classes/appmonitor-server-gui.class.php @@ -30,7 +30,7 @@ * SERVICING, REPAIR OR CORRECTION.
*
* --------------------------------------------------------------------------------
- * @version 0.143 + * @version 0.145 * @author Axel Hahn * @link https://github.com/iml-it/appmonitor * @license GPL @@ -44,6 +44,7 @@ * 2024-11-26 0.142 axel.hahn@unibe.ch handle invalid response data * 2024-11-29 0.143 axel.hahn@unibe.ch filter by multiple tags * 2024-12-06 0.144 axel.hahn@unibe.ch prevent multiple values of same tag (see functions.js) + * 2024-12-09 0.145 axel.hahn@unibe.ch shwo tags in appdetails; config flag: show validation warnings */ class appmonitorserver_gui extends appmonitorserver { @@ -51,7 +52,7 @@ class appmonitorserver_gui extends appmonitorserver * Version * @var string */ - protected string $_sVersion = "0.144"; + protected string $_sVersion = "0.145"; /** * Title/ project name @@ -419,6 +420,7 @@ protected function _generateWebappTiles(string $sAppId): string } foreach ($this->_aCfg['view']['appdetails'] as $key => $bVisibility) { + if(!$bVisibility) continue; switch ($key) { case 'appstatus': $aLast = $this->oNotification->getAppLastResult(); @@ -437,27 +439,23 @@ protected function _generateWebappTiles(string $sAppId): string ); break; case 'httpcode': - $sReturn .= $bVisibility - ? $this->_getTile([ + $sReturn .= $this->_getTile([ 'result' => ((int) $aHostdata['httpstatus'] == 0 || $aHostdata['httpstatus'] >= 400) ? RESULT_ERROR : false, 'label' => $this->_tr('Http-status'), 'count' => $aHostdata['httpstatus'] ? $aHostdata['httpstatus'] : '??', - ]) - : ''; + ]); break; case 'age': $bOutdated = isset($aHostdata["outdated"]) && $aHostdata["outdated"]; - $sReturn .= $bVisibility - ? $this->_getTile([ + $sReturn .= $this->_getTile([ 'result' => $bOutdated ? RESULT_ERROR : RESULT_OK, 'icon' => $this->_aIco['age'], 'label' => $this->_tr('age-of-result'), 'count' => '' . (time() - $aHostdata['ts']) . 's', 'more' => $this->_tr('TTL') . '=' . $aHostdata['ttl'] . 's', - ]) - : ''; + ]); break; case 'checks': $sReturn .= $bVisibility && isset($aHostdata['summary']['total']) @@ -488,26 +486,34 @@ protected function _generateWebappTiles(string $sAppId): string // .'
'.print_r($this->oNotification->getAppNotificationdata(), 1).'
' . (count($aSlackChannels) ? '' . count($aSlackChannels) . ' x ' . $this->_aIco['notify-slack'] . ' ' : ''); $iNotifyTargets = count($aEmailNotifiers) + count($aSlackChannels); - $sReturn .= $bVisibility - ? $this->_getTile([ + $sReturn .= $this->_getTile([ 'result' => $iNotifyTargets ? false : RESULT_WARNING, 'icon' => $this->_aIco['notifications'], 'label' => $this->_tr('Notify-address'), 'count' => $iNotifyTargets, 'more' => $sMoreNotify - ]) - : ''; + ]); break; case 'notification': $sSleeping = $this->oNotification->isSleeptime(); - $sReturn .= $bVisibility - ? $this->_getTile([ + $sReturn .= $this->_getTile([ 'result' => ($sSleeping ? RESULT_WARNING : false), 'icon' => ($sSleeping ? $this->_aIco['sleepmode-on'] : $this->_aIco['sleepmode-off']), 'label' => ($sSleeping ? $this->_tr('Sleepmode-on') : $this->_tr('Sleepmode-off')), 'more' => $sSleeping, - ]) - : ''; + ]); + break; + case 'tags': + $aTags = $this->_data[$sAppId]['meta']['tags'] ?? []; + + $sTaglist = implode(', ', $aTags); + $sReturn .= $this->_getTile([ + 'result' => $sTaglist ? RESULT_OK : RESULT_WARNING, + 'icon' => $this->_aIco['tag'], + 'count' => count($aTags), + 'label' => $this->_tr('Tags'), + 'more' => $sTaglist ?: $this->_tr('Tags-none'), + ]); break; default: @@ -666,7 +672,8 @@ protected function _checkClientResponse(string $sAppId): bool|array $aErrors[] = $this->_tr('msgErr-missing-key-meta-' . $sMetakey); } } - foreach (['ttl', 'time', 'notifications'] as $sMetakey) { + unset($aData['meta']['tags']); + foreach (['ttl', 'time', 'notifications', 'tags'] as $sMetakey) { if (!isset($aData['meta'][$sMetakey])) { $aWarnings[] = $this->_tr('msgWarn-missing-key-meta-' . $sMetakey); } @@ -1375,7 +1382,7 @@ public function generateViewApp(string $sAppId): string (isset($aEntries["result"]) && isset($aEntries["result"]["result"]) && isset($aEntries["result"]["website"]) && isset($aEntries["result"]["host"])) ) { - // --- + // --- top breadcrumb $sTopHeadline = $oA->getSectionHead( '' . '_aCfg['view']['validationwarnings'] ?? true; + if (!$sValidationContent && $aValidatorResult ) { foreach ($aValidatorResult as $sSection => $aMessageItems) { - if (count($aMessageItems)) { + if (count($aMessageItems) + && ( $sSection == 'error' || $sSection == 'warning' && $bShowWarnings ) + ) { $sDivContent = ''; foreach ($aMessageItems as $sSingleMessage) { $sDivContent .= '- ' . $sSingleMessage . '
'; @@ -2018,11 +2028,14 @@ function _generateWeblist(bool $bSkipOk = false, array $aOptions = []): array : $this->_getIconClass($this->_aIco['host']); $sAppLabel = str_replace('.', '.­', $this->_getAppLabel($sAppId)); + $bShowWarnings=!!$this->_aCfg['view']['validationwarnings'] ?? true; $aValidaion = $this->_checkClientResponse($sAppId); $sValidatorinfo = ''; if ($aValidaion) { foreach ($aValidaion as $sSection => $aMessages) { - if (count($aValidaion[$sSection])) { + if (count($aValidaion[$sSection]) + && ( $sSection == 'error' || ($sSection == 'warning' && $bShowWarnings) ) + ) { $sValidatorinfo .= '' . $this->_aIco[$sSection] . ' ' . count($aMessages); } } diff --git a/public_html/server/classes/notificationhandler.class.php b/public_html/server/classes/notificationhandler.class.php index 1400b68..c07df54 100755 --- a/public_html/server/classes/notificationhandler.class.php +++ b/public_html/server/classes/notificationhandler.class.php @@ -324,7 +324,7 @@ public function notify(): bool return false; } $iChangetype = $this->_detectChangetype(); - $iResult = $this->_aAppResult['result']['result']; + $iResult = $this->_aAppResult['result']['result'] ?? RESULT_ERROR; // get the highest value for a delay $iMaxDelay = max(array_values($this->_aDelayNotification)); @@ -735,9 +735,10 @@ protected function sendAllNotifications(): bool 'htmlmessage' => '

IML Appmonitor

+
' . $sMessage .'

' + .'
' , ]; // $sSendMethod="send_$sPlugin"; diff --git a/public_html/server/config/appmonitor-server-config-defaults.json b/public_html/server/config/appmonitor-server-config-defaults.json index a21ee75..2f9d0d2 100755 --- a/public_html/server/config/appmonitor-server-config-defaults.json +++ b/public_html/server/config/appmonitor-server-config-defaults.json @@ -50,8 +50,10 @@ "age": true, "checks": true, "times": true, + "tags": true, "receiver": true, "notification": true - } + }, + "validationwarnings": true } } \ No newline at end of file diff --git a/public_html/server/email.php b/public_html/server/email.php new file mode 100644 index 0000000..c2af086 --- /dev/null +++ b/public_html/server/email.php @@ -0,0 +1,19 @@ +"; +echo "$sBody
"; + +$ret = mail($sTO, $sSUBJECT, $sBody); +var_dump($ret); // (bool)true + diff --git a/public_html/server/lang/de-de.json b/public_html/server/lang/de-de.json index 2ecc4f2..c49d769 100755 --- a/public_html/server/lang/de-de.json +++ b/public_html/server/lang/de-de.json @@ -110,6 +110,9 @@ "Sleepmode-on": "Zzz ... Meldungen sind AUS", "Sleepmode-off": "Meldungen sind AN", + "Tags": "Tags", + "Tags-none": "Kein Tag gesetzt", + "Time": "Zeit", "Time-for-all-checks": "Zeiten aller Checks", @@ -196,7 +199,8 @@ "msgWarn-missing-key-meta-ttl":"Es wurde kein TTL gesetzt via meta > ttl. Es wird der Default verwendet.", "msgWarn-missing-key-meta-notifications":"Es gibt keine Sektion meta > notifications. Im Fehlerfall gibt es keine Meldung an Entwickler / Product Owner dieser Applikation.", "msgWarn-no-notifications":"In der Sektion meta > notification > [target] ist kein Empfänger. Im Fehlerfall gibt es keine Meldung an Entwickler / Product Owner dieser Applikation.", - "msgWarn-missing-key-meta-time":"Es gibt keine Messdaten - es wurde kein Wert gesetzt via meta > time.", + "msgWarn-missing-key-meta-time":"Es gibt keine Zeitmessung am Client - es wurde kein Wert gesetzt via meta > time.", + "msgWarn-missing-key-meta-tags":"Es wurden keine Tags definiert: meta > tags fehlt.", "zzz_lastentry": "This is just a Dummy entry without comma at the end of line" }, diff --git a/public_html/server/lang/en-en.json b/public_html/server/lang/en-en.json index 7dfdcea..c514eab 100755 --- a/public_html/server/lang/en-en.json +++ b/public_html/server/lang/en-en.json @@ -111,6 +111,9 @@ "Sleepmode-on": "Zzz ... notifications OFF", "Sleepmode-off": "Notication is ON", + "Tags": "Tags", + "Tags-none": "No tag was set", + "Time": "Time", "Time-for-all-checks": "time for all checks", @@ -187,7 +190,7 @@ "msgWarn-missing-key-checks-description":"checks > %s > description is not set - this check has no description about its action/ reason.", "msgWarn-missing-key-checks-value":"checks > %s > value is not set - the result of this check has no explaination of its result.", "msgWarn-missing-key-checks-time":"checks > %s > time is not set - the check has no measurement data. This is just a hint: measuring data are optional.", - + "msgWarn-missing-key-meta-tags":"meta > tags is not set - this check has no tags.", "msgErr-missing-section-meta":"There is no section "meta" in the response (request failed?).", "msgErr-missing-key-meta-host":"No hostname was set in meta > host", diff --git a/public_html/server/plugins/notification/email.php b/public_html/server/plugins/notification/email.php index 7fb652b..ae31621 100644 --- a/public_html/server/plugins/notification/email.php +++ b/public_html/server/plugins/notification/email.php @@ -112,7 +112,7 @@ static public function formatMessage($sMsg){ if($bIsHtml){ $sMessage=strstr($sMsg, '') ? $sMsg - : "
$sMsg
" + : "
$sMsg

" ; // if(!strstr($sMsg, '')){ // $sTpl=file_exists(self::$_template) diff --git a/public_html/server/vendor/.htkeep b/public_html/server/vendor/.htkeep deleted file mode 100755 index 8b13789..0000000 --- a/public_html/server/vendor/.htkeep +++ /dev/null @@ -1 +0,0 @@ - diff --git a/public_html/server/vendor/emailcatcher/data/emaildata.txt_ b/public_html/server/vendor/emailcatcher/data/emaildata.txt_ deleted file mode 100644 index 3b379ef..0000000 --- a/public_html/server/vendor/emailcatcher/data/emaildata.txt_ +++ /dev/null @@ -1,18 +0,0 @@ -{"date":"2024-10-20 14:34:00","mail":"To: berta@example.com\r\nSubject: Html message\r\nFrom: sysadmin@example.com\r\nReply-To: sysadmin@example.com\r\nX-Priority: 1 (Highest)\r\nX-MSMail-Priority: High\r\nImportance: High\r\nContent-Type: text\/html; charset=\"utf-8\"\r\n\r\n\n\n

Hello<\/h1>\n

\n I can preview HTML<\/strong> too.\n <\/p>\n<\/body>\n<\/html>\r\n"} -{"date":"2024-10-21 08:07:04","mail":"To: john@example.com\r\nSubject: Text message\r\n\r\n\nHello\n\nHere is a text message.\n\nAxel\n\r\n"} -{"date":"2024-11-06 13:48:24","mail":"To: axel.hahn@unibe.ch\r\nSubject: [Appmonitor] :: Webapp wurde entfernt: https:\/\/intranet.iml.unibe.ch\/appmonitor\/client\/.\r\nFrom: sysadmin@example.com\r\nReply-To: sysadmin@example.com\r\nX-Priority: 1 (Highest)\r\nX-MSMail-Priority: High\r\nImportance: High\r\nContent-Type: text\/html; charset=\"utf-8\"\r\n\r\n

\r\n