diff --git a/TODO.md b/TODO.md index ccd91b2a394712f46a214ccdc6a5e9d68cb91c24..eaa02fb1be5d4be51e968be0a1e60969dc7266bc 100644 --- a/TODO.md +++ b/TODO.md @@ -18,8 +18,8 @@ was ich so sehe ... ✅ Exec ⬜ File --> "exists": false meldet bei Test einer nicht existierenden Datei fälschlicherweise einen Fehler ✅ Hello - ⬜ HttpContent - ⬜ Loadmeter + ✅ HttpContent + ✅ Loadmeter ⬜ MysqlConnect ⬜ PdoConnect ⬜ Phpmodules diff --git a/tests/200_diskfree.php b/tests/200_diskfree.php index f7f34185cf33254c1e66f78b37511df85e7f6739..19b4cd8a475e5e892ace5dfe84d32e86fbd85ce1 100644 --- a/tests/200_diskfree.php +++ b/tests/200_diskfree.php @@ -2,6 +2,6 @@ <?php echo " -WHAT: Run check cert +WHAT: Run check diskfree "; -_exec("$AMCLI --ini='".__DIR__."/configs/cert.ini'"); +_exec("$AMCLI --ini='".__DIR__."/configs/diskfree.ini'"); diff --git a/tests/200_hello.php b/tests/200_hello.php new file mode 100644 index 0000000000000000000000000000000000000000..25f19ac10f7174a2e118ee7c3f9fac5fecf6366b --- /dev/null +++ b/tests/200_hello.php @@ -0,0 +1,7 @@ +#!/usr/bin/env php +<?php + +echo " +WHAT: Run check Hello +"; +_exec("$AMCLI --ini='".__DIR__."/configs/hello.ini'"); diff --git a/tests/200_httpcontent.php b/tests/200_httpcontent.php new file mode 100644 index 0000000000000000000000000000000000000000..8ac9b0df1540e7ce2674d7b855033203bdbfa00e --- /dev/null +++ b/tests/200_httpcontent.php @@ -0,0 +1,7 @@ +#!/usr/bin/env php +<?php + +echo " +WHAT: Run check httpcontent +"; +_exec("$AMCLI --ini='".__DIR__."/configs/httpcontent.ini'"); diff --git a/tests/200_loadmeter.php b/tests/200_loadmeter.php new file mode 100644 index 0000000000000000000000000000000000000000..13875ce9711f2d54d14f9a57ee2def65ba7833bb --- /dev/null +++ b/tests/200_loadmeter.php @@ -0,0 +1,7 @@ +#!/usr/bin/env php +<?php + +echo " +WHAT: Run check loadmeter +"; +_exec("$AMCLI --ini='".__DIR__."/configs/loadmeter.ini'"); diff --git a/tests/200_simple.php b/tests/200_simple.php deleted file mode 100644 index e88d4eb6a65c349923805f858862bbe7f2cc5b1a..0000000000000000000000000000000000000000 --- a/tests/200_simple.php +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env php -<?php - -echo " -WHAT: Run check Simple -"; -_exec("$AMCLI --ini='".__DIR__."/configs/simple.ini'"); diff --git a/tests/configs/httpcontent.ini b/tests/configs/httpcontent.ini new file mode 100644 index 0000000000000000000000000000000000000000..093031b137adeb6360d92a3ca44524ea514f3720 --- /dev/null +++ b/tests/configs/httpcontent.ini @@ -0,0 +1,23 @@ +; ======================================================================= +; +; APPMONITOR CLI CLIENT +; +; for the checks see its parameters +; <https://os-docs.iml.unibe.ch/appmonitor/PHP_client/Plugins/Checks/index.html> +; +; ======================================================================= + + +; ----------------------------------------------------------------------- +; CHECKS +; ----------------------------------------------------------------------- + +["Http content"] +description="Check word 'IML' in IML website" +function="HttpContent" +params='{ + "url": "https://www.iml.unibe.ch/", + "bodycontains": "IML" +}' + +; ----------------------------------------------------------------------- diff --git a/tests/configs/loadmeter.ini b/tests/configs/loadmeter.ini new file mode 100644 index 0000000000000000000000000000000000000000..33b21a965bc3bedd0fbc437fdf3811c5cfe92416 --- /dev/null +++ b/tests/configs/loadmeter.ini @@ -0,0 +1,23 @@ +; ======================================================================= +; +; APPMONITOR CLI CLIENT +; +; for the checks see its parameters +; <https://os-docs.iml.unibe.ch/appmonitor/PHP_client/Plugins/Checks/index.html> +; +; ======================================================================= + + +; ----------------------------------------------------------------------- +; CHECKS +; ----------------------------------------------------------------------- + +["Load"] +description="Loadmeter" +function="Loadmeter" +params='{ + "warning": 3, + "error": 5 +}' + +; -----------------------------------------------------------------------